From b250aed79d12612e30f1ec77da8e2ba93cebd892 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Wed, 5 Mar 2025 15:03:03 -0800 Subject: [PATCH] always trim editableText from itemBox on blur (#5081) So that whitespaces are removed even if the itemBox does not refresh. Fixes: #5080 --- chrome/content/zotero/elements/itemBox.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 609506a1af..7a534951ff 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -2198,6 +2198,8 @@ textbox.setAttribute("min-lines", 1); } var value = textbox.value.trim(); + // Remove trailing whitespaces from editable-text in case itemBox is not refreshed + textbox.value = value; var [field, creatorIndex, creatorField] = fieldName.split('-');