aboutsummaryrefslogtreecommitdiff
path: root/src/background/tabs.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/tabs.js')
-rw-r--r--src/background/tabs.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/background/tabs.js b/src/background/tabs.js
index d4b033a..f44f173 100644
--- a/src/background/tabs.js
+++ b/src/background/tabs.js
@@ -2,8 +2,10 @@ let prevSelTab = 1;
let currSelTab = 1;
browser.tabs.onActivated.addListener((activeInfo) => {
- prevSelTab = currSelTab;
- currSelTab = activeInfo.tabId;
+ return browser.tabs.query({ currentWindow: true }).then((tabs) => {
+ prevSelTab = currSelTab;
+ currSelTab = activeInfo.tabId;
+ });
});
const closeTab = (id) => {