mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
Remove compose.set_mode in favor of compose.start
From Trac ticket #1503: All of the calls to compose.set_mode() should be calling compose.start() instead. Nearly all are impossible to trigger while already composing, and by calling compose.set_mode() they just do the stuff in set_mode() twice. The only case where this would change behavior, that I can see, is if you press C, Shift-Tab to unfocus the compose box without dismissing it and then press c (or vice versa). I think it's okay if we clear the input fields in that unlikely case. (imported from commit ba7f181ec9d1df90a443b0a754462a3a201dcabb)
This commit is contained in:
@@ -1205,11 +1205,11 @@ $(function () {
|
||||
});
|
||||
|
||||
$('.compose_stream_button').click(function (e) {
|
||||
compose.set_mode('stream');
|
||||
compose.start('stream');
|
||||
return false;
|
||||
});
|
||||
$('.compose_private_button').click(function (e) {
|
||||
compose.set_mode('private');
|
||||
compose.start('private');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user