mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
Re-focus on the compose box after a send, auto-move cursor
Re-focuses on the compose box after a send, under these conditions: 1) narrowed to stream+subject -or- responding to PM/huddle 2) compose was initiated by clicking on a message or hitting "r"/"enter" 3) cursor has not moved since you've started the composition Additionally, if you are thus narrowed, we will move your cursor when you've sent a message to that message, assuming that such a message initially appears visible. (imported from commit 373c858081694e6fc9994639340a847d66edb566)
This commit is contained in:
@@ -357,9 +357,12 @@ function send_message() {
|
||||
$("#compose-send-button").removeAttr('disabled');
|
||||
$("#sending-indicator").hide();
|
||||
send_status.hide();
|
||||
if (respond_to_cursor) {
|
||||
if (respond_to_cursor && narrow.narrowed_by_reply()) {
|
||||
respond_to_message({trigger: 'autorespond'});
|
||||
}
|
||||
else {
|
||||
respond_to_cursor = false;
|
||||
}
|
||||
},
|
||||
error: function (xhr, error_type) {
|
||||
if (error_type !== 'timeout' && reload.is_pending()) {
|
||||
|
||||
Reference in New Issue
Block a user