Commit 1d14a2b9 authored by JC Brand's avatar JC Brand

Use const for enter key

parent 46fe0ac5
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment