composebox_typeahead: Focus composebox when topic is selected.

Fixes bug reported here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/focus.20after.20choosing.20from.20topic.20typeahead/near/2180336
This commit is contained in:
Evy Kassirer
2025-05-28 13:29:51 -07:00
committed by Tim Abbott
parent 760026c7a7
commit 4751740d3c

View File

@@ -1535,6 +1535,11 @@ export function initialize({
}
return sorted;
},
updater(item: string, _query: string): string {
$("textarea#compose-textarea").trigger("focus");
$nextFocus = undefined;
return item;
},
option_label(matching_items: string[], item: string): string | false {
if (!matching_items.includes(item)) {
return `<em>${$t({defaultMessage: "New"})}</em>`;