aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 8c4cfc82..b9656882 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -307,11 +307,17 @@ class Frontend {
}
async _updatePopup() {
- const showIframePopupsInRootFrame = this._options.general.showIframePopupsInRootFrame;
+ const {usePopupWindow, showIframePopupsInRootFrame} = this._options.general;
const isIframe = !this._useProxyPopup && (window !== window.parent);
let popupPromise;
- if (
+ if (usePopupWindow) {
+ popupPromise = this._popupCache.get('window');
+ if (typeof popupPromise === 'undefined') {
+ popupPromise = this._getPopupWindow();
+ this._popupCache.set('window', popupPromise);
+ }
+ } else if (
isIframe &&
showIframePopupsInRootFrame &&
DocumentUtil.getFullscreenElement() === null &&
@@ -404,6 +410,14 @@ class Frontend {
return popup;
}
+ async _getPopupWindow() {
+ return await this._popupFactory.getOrCreatePopup({
+ ownerFrameId: this._frameId,
+ depth: this._depth,
+ popupWindow: true
+ });
+ }
+
_ignoreElements() {
if (this._popup !== null) {
const container = this._popup.container;