aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--panorama.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/panorama.js b/panorama.js
index c2b4095..f9649da 100644
--- a/panorama.js
+++ b/panorama.js
@@ -391,6 +391,13 @@ function removeTab (tab, count, focusLeftTab, quitOnLastTab) {
return;
}
+
+ // delegate selecting a tab to Firefox after the tab removed
+ if (count === 1 && !focusLeftTab && tab.owner) {
+ remove(tab);
+ return;
+ }
+
let vTabs = gb.visibleTabs;
let index = vTabs.indexOf(tab);
liberator.assert(index >= 0, "No such tab(s) in the current tabs");