mirror of https://github.com/gorhill/uBlock.git
Firefox: fix tab closing issue (pop-up blocking)
This commit is contained in:
parent
97b5ad9ad5
commit
32c7bf854b
|
@ -127,7 +127,9 @@ const contentObserver = {
|
|||
context = context.contentWindow || context;
|
||||
|
||||
try {
|
||||
openerURL = context.opener.location.href;
|
||||
if ( context !== context.opener ) {
|
||||
openerURL = context.opener.location.href;
|
||||
}
|
||||
} catch (ex) {}
|
||||
|
||||
let isPopup = location.spec === 'about:blank' && openerURL;
|
||||
|
@ -139,7 +141,9 @@ const contentObserver = {
|
|||
context = context.contentWindow || context;
|
||||
|
||||
try {
|
||||
openerURL = context.opener.location.href;
|
||||
if ( context !== context.opener ) {
|
||||
openerURL = context.opener.location.href;
|
||||
}
|
||||
} catch (ex) {}
|
||||
} else {
|
||||
context = (context.ownerDocument || context).defaultView;
|
||||
|
|
|
@ -980,10 +980,17 @@ var httpObserver = {
|
|||
var tabURI = tab.linkedBrowser.currentURI;
|
||||
|
||||
// Probably isn't the best method to identify the source tab
|
||||
if ( tabURI.spec === this.lastRequest.openerURL ) {
|
||||
sourceTabId = vAPI.tabs.getTabId(tab);
|
||||
if ( tabURI.spec !== lastRequest.openerURL ) {
|
||||
continue
|
||||
}
|
||||
|
||||
sourceTabId = vAPI.tabs.getTabId(tab);
|
||||
|
||||
if ( sourceTabId !== lastRequest.tabId ) {
|
||||
break;
|
||||
}
|
||||
|
||||
sourceTabId = null;
|
||||
}
|
||||
|
||||
if ( this.handlePopup(channel.URI, lastRequest.tabId, sourceTabId) ) {
|
||||
|
|
Loading…
Reference in New Issue