From 909cbb89753928400e95e7012cee86cb170c0f36 Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Thu, 13 May 2021 00:25:13 +0530 Subject: [PATCH] bug fix --- static/js/app.js | 1 - static/js/message.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 7fe2700..64d7084 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -156,7 +156,6 @@ function connect(frm) { var url = '/?' + frm.find('[name=kaksh_kunjika]').val() + '&' + frm.find('[name=kunjika]').val() + '&' + frm.find('[name=name]').val(); - console.log('here') history.pushState({}, 'Lupt Chat', url); socket.send(JSON.stringify({cmd: 'list'})); diff --git a/static/js/message.js b/static/js/message.js index b331e65..f6bb966 100644 --- a/static/js/message.js +++ b/static/js/message.js @@ -33,7 +33,7 @@ let Messages = class { },2000); }); $('#send_box').keypress(function(e) { - if(e.originalEvent.charCode == 13 && !e.shiftKey) { + if(e.key === 'Enter' && !e.shiftKey) { send(); e.preventDefault(); clearTimeout(timeout);