diff --git a/src/js/tab.js b/src/js/tab.js index 2e978163d..55b400dd5 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -513,6 +513,10 @@ housekeep itself. } }; + // https://github.com/uBlockOrigin/uBlock-issues/issues/1184 + // Do not consider a tab opened from `about:newtab` to be a popup + // candidate. + const onTabCreated = async function(createDetails) { const { sourceTabId, sourceFrameId, tabId } = createDetails; const popup = popupCandidates.get(tabId); @@ -533,6 +537,13 @@ housekeep itself. catch (reason) { return; } + if ( + Array.isArray(openerDetails) === false || + openerDetails.length !== 2 || + openerDetails[1].url === 'about:newtab' + ) { + return; + } popupCandidates.set( tabId, new PopupCandidate(createDetails, openerDetails)