NiklasGollenstede/unload-tabs

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

char101 opened this issue · 1 comments

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.

Yes, that seems much smoother.