From b4c5c5d5391dbfbea3ad980ebdab796e08934157 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 16 May 2024 11:07:15 -0400 Subject: [PATCH] Item pane header: Use focused getter instead of :focus-within :focus-within doesn't match when the window is inactive but the field is focused. Addresses #4101, except that focusing the new item's title field and pressing Escape will clear the field (without modifying the item). --- chrome/content/zotero/elements/itemPaneHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/itemPaneHeader.js b/chrome/content/zotero/elements/itemPaneHeader.js index 69e2d61950..f931a8db13 100644 --- a/chrome/content/zotero/elements/itemPaneHeader.js +++ b/chrome/content/zotero/elements/itemPaneHeader.js @@ -179,7 +179,7 @@ } async blurOpenField() { - if (this.titleField?.matches(':focus-within')) { + if (this.titleField.focused) { this.titleField.blur(); await this.save(); }