summaryrefslogtreecommitdiff
path: root/ext/js/display/display.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-15 16:30:33 -0400
committerGitHub <noreply@github.com>2021-05-15 16:30:33 -0400
commit2c752fd89d3427da855704406e34c9458d33e832 (patch)
tree1af110210e39fccc008ef6c31940303a38ddc60a /ext/js/display/display.js
parentbc6fb4e7d742b40bb18965f5aa3e8a1a867b068e (diff)
Popup action search (#1678)
* Set up search page in the action popup * Fix a style causing incorrect overflow * Fix error when trying to take a screenshot * Fix popup size on Firefox
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r--ext/js/display/display.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index 6895ea74..7bfe3add 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -1571,7 +1571,11 @@ class Display extends EventDispatcher {
audioDetails = {sources: sources2, preferredAudioIndex, customSourceUrl, customSourceType};
}
- const screenshotDetails = (AnkiUtil.fieldsObjectContainsMarker(fields, 'screenshot') ? {tabId: this._contentOriginTabId, frameId: this._contentOriginFrameId, format, quality} : null);
+ const screenshotDetails = (
+ AnkiUtil.fieldsObjectContainsMarker(fields, 'screenshot') && typeof this._contentOriginTabId === 'number' ?
+ {tabId: this._contentOriginTabId, frameId: this._contentOriginFrameId, format, quality} :
+ null
+ );
const clipboardDetails = {
image: AnkiUtil.fieldsObjectContainsMarker(fields, 'clipboard-image'),