From 96fdae726a883119540649a5596360afdc17e305 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 25 Nov 2022 09:22:45 -0500 Subject: [PATCH] Be sure we query for the current window Related issue: - https://github.com/uBlockOrigin/uBOL-issues/issues/14#issuecomment-1327181436 --- platform/mv3/extension/js/popup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/mv3/extension/js/popup.js b/platform/mv3/extension/js/popup.js index 9cf55fed1..55f78b404 100644 --- a/platform/mv3/extension/js/popup.js +++ b/platform/mv3/extension/js/popup.js @@ -260,7 +260,10 @@ dom.on('#lessButton', 'click', ( ) => { /******************************************************************************/ async function init() { - const [ tab ] = await browser.tabs.query({ active: true }); + const [ tab ] = await browser.tabs.query({ + active: true, + windowId: browser.windows.WINDOW_ID_CURRENT, + }); if ( tab instanceof Object === false ) { return true; } Object.assign(currentTab, tab);