From 46f60619d58c355afd067f391c3f7dec5f63577a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 1 May 2021 17:30:17 -0400 Subject: Display fixes (#1648) * Fix incorrect tabId/frameId being used * Only enable nested popups if the tabId is valid * Remove unused APIs --- ext/js/display/display.js | 20 ++++++++------------ ext/js/display/search-display-controller.js | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'ext/js') diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 720e1de5..6895ea74 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -194,14 +194,6 @@ class Display extends EventDispatcher { return this._progressIndicatorVisible; } - get tabId() { - return this._tabId; - } - - get frameId() { - return this._frameId; - } - get parentPopupId() { return this._parentPopupId; } @@ -1635,10 +1627,14 @@ class Display extends EventDispatcher { async _updateNestedFrontend(options) { const isSearchPage = (this._pageType === 'search'); - const isEnabled = this._childrenSupported && ( - (isSearchPage) ? - (options.scanning.enableOnSearchPage) : - (this._depth < options.scanning.popupNestingMaxDepth) + const isEnabled = ( + this._childrenSupported && + typeof this._tabId === 'number' && + ( + (isSearchPage) ? + (options.scanning.enableOnSearchPage) : + (this._depth < options.scanning.popupNestingMaxDepth) + ) ); if (this._frontend === null) { diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js index e60de796..d7d79d54 100644 --- a/ext/js/display/search-display-controller.js +++ b/ext/js/display/search-display-controller.js @@ -368,8 +368,8 @@ class SearchDisplayController { dictionaryEntries: null, animate, contentOrigin: { - tabId: this.tabId, - frameId: this.frameId + tabId: this._tabId, + frameId: this._frameId } } }; -- cgit v1.2.3