From 6250109a78ac5d6fc35e569a87b9541e3183397d Mon Sep 17 00:00:00 2001 From: Deathamns Date: Thu, 15 Jan 2015 15:58:14 +0100 Subject: [PATCH] Firefox: fix tab closing issue (pop-up blocking) --- platform/firefox/frameModule.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index 8fa5519..ad24e49 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -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;