From ef4ea2271b67dd51dc0b15e2e0958999d64f3ce1 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 24 Jun 2021 19:18:33 -0400 Subject: [PATCH] Fix handling of document.body as (#1748) --- ext/js/app/popup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ||