diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-06-24 19:18:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 19:18:33 -0400 |
commit | ef4ea2271b67dd51dc0b15e2e0958999d64f3ce1 (patch) | |
tree | 6b7f99ca37851a9f27b32777383bb6978d5546b9 | |
parent | 1878b118fb1f7caad5b5dbbb10c7ca36e9bc2d76 (diff) |
Fix handling of document.body as <frameset> (#1748)
-rw-r--r-- | ext/js/app/popup.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/app/popup.js b/ext/js/app/popup.js index 43699735..63657dd3 100644 --- a/ext/js/app/popup.js +++ b/ext/js/app/popup.js @@ -503,7 +503,10 @@ class Popup extends EventDispatcher { } _getFrameParentElement() { - const defaultParent = document.body; + let defaultParent = document.body; + if (defaultParent !== null && defaultParent.tagName.toLowerCase() === 'frameset') { + defaultParent = document.documentElement; + } const fullscreenElement = DocumentUtil.getFullscreenElement(); if ( fullscreenElement === null || |