message_edit: Focus on dropdown-widget if only changing stream is allowed.

Previously, content box was focused inspite of it being disabled in case
when only stream editing was allowed. Now we instead focus on the stream
down.
This commit is contained in:
Sahil Batra
2022-09-29 20:15:42 +05:30
committed by Tim Abbott
parent 6d5118674d
commit d6b85404d2

View File

@@ -599,6 +599,8 @@ function edit_message($row, raw_content) {
$message_edit_topic.trigger("focus");
} else if (editability === editability_types.TOPIC_ONLY) {
$row.find(".message_edit_topic").trigger("focus");
} else if (editability !== editability_types.FULL && is_stream_editable) {
$row.find(".select_stream_setting .dropdown-toggle").trigger("focus");
} else {
$message_edit_content.trigger("focus");
// Put cursor at end of input.