mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:32:18 +00:00
Prevent multiple enters from sending duplicate messages
(imported from commit 872bb9971a6af3e352318665559e00b502dfb880)
This commit is contained in:
@@ -104,9 +104,12 @@ function handle_keydown(e) {
|
|||||||
&& code === 13 && !e.shiftKey
|
&& code === 13 && !e.shiftKey
|
||||||
&& enter_sends) {
|
&& enter_sends) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if ($("#compose-send-button").attr('disabled') !== "disabled") {
|
||||||
|
$("#compose-send-button").attr('disabled', 'disabled');
|
||||||
compose.finish();
|
compose.finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user