stream_settings: Place the cursor automatically in channel name.

When the user opens channel create settings from left sidebar, now the focus
is set on the channel name input.

The logic was already there, but not properly placed inside the overlay code path.

Fixes #32034.
This commit is contained in:
Aditya Chaudhary 2024-10-24 03:36:21 +05:30 committed by GitHub
parent c1fc8e6331
commit ac652ffab6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 7 deletions

View File

@ -818,7 +818,7 @@ 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");
@ -826,6 +826,8 @@ export function launch(section, left_side_tab, right_side_tab) {
$("#search_stream_name").trigger("focus");
}
}
}, 0);
});
}
export function switch_rows(event) {