From 41353f01cfb05eed7d029fd32514956e6f64ef92 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 28 Aug 2026 13:14:11 -0400 Subject: [PATCH] Add find-as-you-type to createMenuForTarget() A collection in a submenu can't otherwise be reached from the keyboard. --- chrome/content/zotero/xpcom/utilities_internal.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 71356d5242..d6fb48e231 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -1774,6 +1774,10 @@ Zotero.Utilities.Internal = { * Create a libraryOrCollection DOM tree to place in element. * If has no children, returns a element, otherwise . * + * When the menu belongs to a , typing while the menu is closed selects the + * first matching target at any depth, since the platform's own find-as-you-type only + * reaches the items of the open popup. + * * @param {Library|Collection} libraryOrCollection * @param {Node} elem Parent element * @param {Zotero.Library|Zotero.Collection} currentTarget Currently selected item (displays as checked) @@ -1886,7 +1890,9 @@ Zotero.Utilities.Internal = { return menu; } - return _appendTarget(libraryOrCollection, elem); + var node = _appendTarget(libraryOrCollection, elem); + this.addMenuFindAsYouType(elem); + return node; },