From 673952e82576b0bc4b6b02c2105fbb1850e55950 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 9 Feb 2021 23:14:29 -0500 Subject: Fix window popup screenshot (#1365) * Pass tabId to the screenshot functionality * Make setVisibleOverride async * Fix argument order * Fix incorrect windowId * Remove unused argument --- ext/mixed/js/display.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/mixed') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 69cc3d42..c8b7b14b 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -1539,10 +1539,9 @@ class Display extends EventDispatcher { } = options; const timestamp = Date.now(); - const screenshotFrameId = this._contentOriginFrameId; const definitionDetails = this._getDefinitionDetailsForNote(definition); const audioDetails = (mode !== 'kanji' && this._ankiNoteBuilder.containsMarker(fields, 'audio') ? {sources, customSourceUrl, customSourceType} : null); - const screenshotDetails = (this._ankiNoteBuilder.containsMarker(fields, 'screenshot') ? {frameId: screenshotFrameId, format, quality} : null); + const screenshotDetails = (this._ankiNoteBuilder.containsMarker(fields, 'screenshot') ? {tabId: this._contentOriginTabId, frameId: this._contentOriginFrameId, format, quality} : null); const clipboardDetails = { image: this._ankiNoteBuilder.containsMarker(fields, 'clipboard-image'), text: this._ankiNoteBuilder.containsMarker(fields, 'clipboard-text') -- cgit v1.2.3