Prevent multiple enters from sending duplicate messages

(imported from commit 872bb9971a6af3e352318665559e00b502dfb880)
This commit is contained in:
Jeff Arnold 2013-03-01 11:55:01 -05:00
parent cad295b9d9
commit 06a44077aa
1 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,10 @@ function handle_keydown(e) {
&& code === 13 && !e.shiftKey
&& enter_sends) {
e.preventDefault();
compose.finish();
if ($("#compose-send-button").attr('disabled') !== "disabled") {
$("#compose-send-button").attr('disabled', 'disabled');
compose.finish();
}
}
}