mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
compose: Focus on topic when narrowed to a stream+topic.
When narrowed to a stream+topic and clicking the "new topic" button, focus in on topic and the text remains selected. Fixes #3888.
This commit is contained in:
committed by
Tim Abbott
parent
b8341280e8
commit
21f0339cfc
@@ -264,8 +264,13 @@ exports.start = function (msg_type, opts) {
|
||||
|
||||
is_composing_message = msg_type;
|
||||
|
||||
// Show either stream/topic fields or "You and" field.
|
||||
show_box_for_msg_type(msg_type, opts);
|
||||
// Set focus to "Topic" when narrowed to a stream+topic and "New topic" button clicked.
|
||||
if (opts.trigger === "new topic button") {
|
||||
show_box('stream', $("#subject"), opts);
|
||||
} else {
|
||||
// Show either stream/topic fields or "You and" field.
|
||||
show_box_for_msg_type(msg_type, opts);
|
||||
}
|
||||
|
||||
compose_fade.start_compose(msg_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user