From 1d14a2b95095e8e5ab45716daaf80e33db309041 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 18 Sep 2013 09:25:40 +0200 Subject: [PATCH] Use const for enter key --- converse.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/converse.js b/converse.js index 61aaf75b9..1fde3b334 100644 --- a/converse.js +++ b/converse.js @@ -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();