Use const for enter key

This commit is contained in:
JC Brand 2013-09-18 09:25:40 +02:00
parent 46fe0ac511
commit 1d14a2b950

View File

@ -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();