NiklasGollenstede / unload-tabs

WebExtension that unloads tabs and prevents tabs from loading
https://addons.mozilla.org/addon/unload-tabs/
Mozilla Public License 2.0
69 stars 13 forks source link

When unloading all tabs in a tabgroup, firefox will jump into a random tabgroup #4

Closed char101 closed 7 years ago

char101 commented 7 years ago

Hi,

I think findClosestNonPending should only search tabs in the visibleTabs list, and if no loaded tab is found, it should just return null. Then we can change this into

gBrowser.selectedTab = findClosestNonPending(tab.parentNode.children, tab) || 
                       gBrowser.addTab();

Because otherwise the browser will jump into a random tabgroup which is a bit confusing.

NiklasGollenstede commented 7 years ago

Yes, that seems much smoother.