From 69e3a995aed03899daf8ea8f78217c4028c6161c Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:56:05 +0200 Subject: [PATCH] gh-13024: Fixed restoring tab state also taking into account scroll (gh-13034) --- src/zen/tabs/ZenPinnedTabManager.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs index 7d26334ca..1e2d4fc3c 100644 --- a/src/zen/tabs/ZenPinnedTabManager.mjs +++ b/src/zen/tabs/ZenPinnedTabManager.mjs @@ -427,6 +427,11 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { state.image = tab.zenStaticIcon || initialState.image; state.index = 0; + // See gh-13024, we need to remove the scroll position from the state, + // otherwise when we reset the pinned tab, it will scroll to the previous position + // which can be confusing for the user, especially if they have a long page. + delete state.scroll; + SessionStore.setTabState(tab, state); this.resetPinChangedUrl(tab); }