From a9089b3120d8f9fa7074a7c9132a12af801c0243 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 7 Jul 2015 12:11:11 -0400 Subject: [PATCH] this fixes #452 --- platform/firefox/frameModule.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index 79c3c3353..7a0d84ded 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -163,7 +163,11 @@ const contentObserver = { context.opener !== context && this.ignoredPopups.has(context) === false ) { - openerURL = context.opener.location.href; + // https://github.com/gorhill/uBlock/issues/452 + // Use location of top window, not that of a frame, as this + // would cause tab id lookup (necessary for popup blocking) to + // always fail. + openerURL = context.opener.top && context.opener.top.location.href; } } else if ( type === this.SUB_FRAME ) { context = context.contentWindow;