default_channel: Fix multiple modals opening.

Earlier, the `Add Channel` button was being focused even after the
modal was open, causing multiple modals to open on pressing enter
repeatedly.
This commit fixes the issue by removing the focus from the `Add
Channel` button after the modal is open by focusing the dropdown on the
modal.
This commit is contained in:
Kenneth Rodrigues
2024-07-23 13:11:42 +05:30
committed by Tim Abbott
parent fe557bde77
commit c4c9c59a41

View File

@@ -222,6 +222,9 @@ function show_add_default_streams_modal(): void {
loading_spinner: true,
on_click: add_default_streams,
post_render: default_stream_post_render,
on_shown() {
$("#select_default_stream_0_widget").trigger("focus");
},
});
}