www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 01716183d75b04adf12058242f33c6ab0b7a1791
parent a080e4090d4fc26b8b36cbf6e8e13c9e66dc03f5
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  4 Jul 2015 17:09:26 -0400

Prevent erroneous hiding of hideonpagechange guidance panels on complex pages

Diffstat:
Mchrome/content/zotero/bindings/guidancepanel.xml | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml @@ -119,7 +119,15 @@ self.removeEventListener("popupshown", popupShownListener); let appcontent = document.getElementById('appcontent'); - let pageHideListener = function () { + let pageHideListener = function (event) { + var doc = event.originalTarget; + if(!(doc instanceof HTMLDocument)) return; + + var rootDoc = doc.defaultView.top.document; + // Don't hide when frames and special URLs are unloaded + if (rootDoc != doc || !rootDoc.location.href.startsWith('http')) { + return; + } appcontent.removeEventListener("pagehide", pageHideListener); self.hide(); };