mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
compose: Stop selecting compose box content after topic change.
Previously, the on_topic_change handler for the compose system would focus the compose box after a topic change, and also select all content in the compose box. Selecting that content makes sense if we think the user's intent is likely to be deleting that content; but there's no clear reason we should expect that intent, and it's not particularly consistent with our drafts model to risk accidentally losing partially composed message content this way. After some discussion, we've concluded that in both cases reaching this code path (either the previous topic being "" or the compose box content being entry), it'd be better to skip the `.select()`. Fixes #23146.
This commit is contained in:
@@ -521,7 +521,7 @@ export function on_topic_narrow() {
|
||||
compose_validate.warn_if_topic_resolved(true);
|
||||
compose_fade.set_focused_recipient("stream");
|
||||
compose_fade.update_message_list();
|
||||
$("#compose-textarea").trigger("focus").trigger("select");
|
||||
$("#compose-textarea").trigger("focus");
|
||||
}
|
||||
|
||||
export function quote_and_reply(opts) {
|
||||
|
||||
Reference in New Issue
Block a user