Use const for enter key
This commit is contained in:
parent
46fe0ac511
commit
1d14a2b950
@ -48,6 +48,9 @@
|
||||
var UNVERIFIED= 1;
|
||||
var VERIFIED= 2;
|
||||
var FINISHED = 3;
|
||||
var KEY = {
|
||||
ENTER: 13
|
||||
};
|
||||
|
||||
// Default values
|
||||
var converse = this;
|
||||
@ -785,7 +788,7 @@
|
||||
keyPressed: function (ev) {
|
||||
var $textarea = $(ev.target),
|
||||
message, notify, composing;
|
||||
if(ev.keyCode == 13) {
|
||||
if(ev.keyCode == KEY.ENTER) {
|
||||
ev.preventDefault();
|
||||
message = $textarea.val();
|
||||
$textarea.val('').focus();
|
||||
|
Loading…
Reference in New Issue
Block a user