mirror of https://github.com/zulip/zulip.git
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:
parent
c1fc8e6331
commit
ac652ffab6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue