Browse Source

feat: make getActiveTab work with devtools for popup

tophf 5 years ago
parent
commit
c037cd5beb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/index.js

+ 1 - 1
src/common/index.js

@@ -145,7 +145,7 @@ export function decodeFilename(filename) {
 export async function getActiveTab() {
   const [tab] = await browser.tabs.query({
     active: true,
-    lastFocusedWindow: true, // also gets incognito windows
+    windowId: -2, // chrome.windows.WINDOW_ID_CURRENT works when debugging the popup in devtools
   });
   return tab;
 }