mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-02 21:59:18 +00:00
gh-13024: Fixed restoring tab state also taking into account scroll (gh-13034)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user