mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 684773 - Unpin all tabs earlier when restoring a session in overwriting mode; r=dietrich
This commit is contained in:
parent
28beac255b
commit
205944c60f
@ -2601,17 +2601,17 @@ SessionStoreService.prototype = {
|
||||
var smoothScroll = tabstrip.smoothScroll;
|
||||
tabstrip.smoothScroll = false;
|
||||
|
||||
// make sure that the selected tab won't be closed in order to
|
||||
// prevent unnecessary flickering
|
||||
if (aOverwriteTabs && tabbrowser.selectedTab._tPos >= newTabCount)
|
||||
tabbrowser.moveTabTo(tabbrowser.selectedTab, newTabCount - 1);
|
||||
|
||||
// unpin all tabs to ensure they are not reordered in the next loop
|
||||
if (aOverwriteTabs) {
|
||||
for (let t = tabbrowser._numPinnedTabs - 1; t > -1; t--)
|
||||
tabbrowser.unpinTab(tabbrowser.tabs[t]);
|
||||
}
|
||||
|
||||
// make sure that the selected tab won't be closed in order to
|
||||
// prevent unnecessary flickering
|
||||
if (aOverwriteTabs && tabbrowser.selectedTab._tPos >= newTabCount)
|
||||
tabbrowser.moveTabTo(tabbrowser.selectedTab, newTabCount - 1);
|
||||
|
||||
for (var t = 0; t < newTabCount; t++) {
|
||||
tabs.push(t < openTabCount ?
|
||||
tabbrowser.tabs[t] :
|
||||
|
Loading…
Reference in New Issue
Block a user