fixed chat sending messages from web.

event.keyCode === '13', where the strict equal operator seem to break
safari, firefox and chrome (different value types? keydown event seem
not to provide either a string nor an integer)
This commit is contained in:
Arthur Mayer 2011-02-23 21:26:51 +01:00
parent 1d2cce6caa
commit cc0bb3b509

View File

@ -208,7 +208,7 @@ DynMap.prototype = {
value: '' value: ''
}) })
.keydown(function(event) { .keydown(function(event) {
if (event.keyCode === '13') { if (event.keyCode == '13') {
event.preventDefault(); event.preventDefault();
sendChat(chatinput.val()); sendChat(chatinput.val());
chatinput.val(''); chatinput.val('');