Prevent erroneous hiding of hideonpagechange guidance panels on complex pages
This commit is contained in:
parent
a080e4090d
commit
01716183d7
1 changed files with 9 additions and 1 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue