From 30e13354b3b58a7d7cfce26487076eaaa7552416 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 15 Dec 2019 21:34:18 -0500 Subject: [PATCH] Add Popup.isProxy --- ext/fg/js/frontend.js | 2 +- ext/fg/js/popup-proxy.js | 4 ++++ ext/fg/js/popup.js | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 8835df70..2fa69c9d 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -22,7 +22,7 @@ class Frontend extends TextScanner { super( window, ignoreNodes, - [popup.getContainer()], + popup.isProxy() ? [] : [popup.getContainer()], [(x, y) => this.popup.containsPoint(x, y)] ); diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js index d90d98be..0471705f 100644 --- a/ext/fg/js/popup-proxy.js +++ b/ext/fg/js/popup-proxy.js @@ -48,6 +48,10 @@ class PopupProxy { // Public functions + isProxy() { + return true; + } + async setOptions(options) { const id = await this._getPopupId(); return await this._invokeHostApi('setOptions', {id, options}); diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index 552bdcf6..de2c7863 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -52,6 +52,10 @@ class Popup { // Public functions + isProxy() { + return false; + } + async setOptions(options) { this.options = options; this.updateTheme();