compose: Keeps focus on channel picker input during navigation.

This commit ensures the hover state appears on the first list item in
the channel picker dropdown by default. It enables navigation through
the list using Up/Down arrows while keeping browser focus in the text
input. The Tab key now shifts focus to the topic input instead of the
next list item.

Fixes: #33448.
This commit is contained in:
Aditya Kumar Kasaudhan
2025-03-08 02:27:41 +05:30
committed by Tim Abbott
parent b79547d9e2
commit fbb0516385

View File

@@ -304,6 +304,13 @@ export function initialize(): void {
tippy_props: {
offset: [-10, 5],
},
keep_focus_on_search: true,
tab_moves_focus_to_target() {
if (compose_state.get_message_type() === "stream") {
return "#stream_message_recipient_topic";
}
return "#private_message_recipient";
},
});
compose_select_recipient_dropdown_widget.setup();