Fix handling of document.body as <frameset> (#1748)

This commit is contained in:
toasted-nutbread 2021-06-24 19:18:33 -04:00 committed by GitHub
parent 1878b118fb
commit ef4ea2271b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,7 +503,10 @@ class Popup extends EventDispatcher {
} }
_getFrameParentElement() { _getFrameParentElement() {
const defaultParent = document.body; let defaultParent = document.body;
if (defaultParent !== null && defaultParent.tagName.toLowerCase() === 'frameset') {
defaultParent = document.documentElement;
}
const fullscreenElement = DocumentUtil.getFullscreenElement(); const fullscreenElement = DocumentUtil.getFullscreenElement();
if ( if (
fullscreenElement === null || fullscreenElement === null ||