Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream_settings: Place the cursor automatically in channel name.

Aditya Chaudharyac652ffab636
diff --git a/web/src/stream_settings_ui.js b/web/src/stream_settings_ui.js
index 7ee0f08f446..39b8b3d739e 100644
--- a/web/src/stream_settings_ui.js
+++ b/web/src/stream_settings_ui.js
@@ -818,14 +818,16 @@ export function launch(section, left_side_tab, right_side_tab) {
},
});
change_state(section, left_side_tab, right_side_tab);
+ setTimeout(() => {
+ if (!stream_settings_components.get_active_data().id) {
+ if (section === "new") {
+ $("#create_stream_name").trigger("focus");
+ } else {
+ $("#search_stream_name").trigger("focus");
+ }
+ }
+ }, 0);
});
- if (!stream_settings_components.get_active_data().id) {
- if (section === "new") {
- $("#create_stream_name").trigger("focus");
- } else {
- $("#search_stream_name").trigger("focus");
- }
- }
}
export function switch_rows(event) {