mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
Replace compose.toggle_mode with compose.set_mode
This fixes a bug where you could click on the already-selected mode button, and it would switch modes without changing which button is selected. (imported from commit 263ee0b52ba844c52a3a60968bb1bbff73482412)
This commit is contained in:
@@ -150,9 +150,10 @@ exports.clear = function () {
|
||||
$("#compose").find('input[type=text], textarea').val('');
|
||||
};
|
||||
|
||||
exports.toggle_mode = function () {
|
||||
if (compose.composing() === 'stream') {
|
||||
// In stream tab, switch to private
|
||||
// Set the mode of a compose already in progress.
|
||||
// Does not clear the input fields.
|
||||
exports.set_mode = function (mode) {
|
||||
if (mode === 'private') {
|
||||
show('private', $("#private_message_recipient"));
|
||||
is_composing_message = "private";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user