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

Use const for enter key

parent 46fe0ac5
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
var UNVERIFIED= 1; var UNVERIFIED= 1;
var VERIFIED= 2; var VERIFIED= 2;
var FINISHED = 3; var FINISHED = 3;
var KEY = {
ENTER: 13
};
// Default values // Default values
var converse = this; var converse = this;
...@@ -785,7 +788,7 @@ ...@@ -785,7 +788,7 @@
keyPressed: function (ev) { keyPressed: function (ev) {
var $textarea = $(ev.target), var $textarea = $(ev.target),
message, notify, composing; message, notify, composing;
if(ev.keyCode == 13) { if(ev.keyCode == KEY.ENTER) {
ev.preventDefault(); ev.preventDefault();
message = $textarea.val(); message = $textarea.val();
$textarea.val('').focus(); $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