From 4fa208d4d7153c32f4c169e05cc663138a503bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 22 Nov 2022 15:52:57 +0200 Subject: [PATCH] fx-compat: Fix pasting in quick format dialog --- chrome/content/zotero/integration/quickFormat.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 267634cf4b..700b6ee8fc 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -1426,11 +1426,12 @@ var Zotero_QuickFormat = new function () { event.preventDefault(); var str = Zotero.Utilities.Internal.getClipboard("text/unicode"); - if(str) { + if (str) { + isPaste = true; var selection = qfiWindow.getSelection(); var range = selection.getRangeAt(0); range.deleteContents(); - range.insertNode(document.createTextNode(str.replace(/[\r\n]/g, " ").trim())); + range.insertNode(qfiDocument.createTextNode(str.replace(/[\r\n]/g, " ").trim())); range.collapse(false); _resetSearchTimer(); }