diff options
author | Saptak S <saptak013@gmail.com> | 2020-11-10 20:14:23 +0530 |
---|---|---|
committer | Saptak S <saptak013@gmail.com> | 2020-11-10 20:14:23 +0530 |
commit | e7de93cd84c50aea4fe783abf19b4e15c812affd (patch) | |
tree | 077ae7ef6102902f9eba8f456c3094f5691e8862 /cli | |
parent | d1cada0f7e88a58ae0be82b66cdd8d5da1219bb5 (diff) | |
download | onionshare-e7de93cd84c50aea4fe783abf19b4e15c812affd.tar.gz onionshare-e7de93cd84c50aea4fe783abf19b4e15c812affd.zip |
Makes username input blur on pressing enter
Diffstat (limited to 'cli')
-rw-r--r-- | cli/onionshare_cli/resources/static/js/chat.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/onionshare_cli/resources/static/js/chat.js b/cli/onionshare_cli/resources/static/js/chat.js index c4d76bb5..258b020b 100644 --- a/cli/onionshare_cli/resources/static/js/chat.js +++ b/cli/onionshare_cli/resources/static/js/chat.js @@ -50,7 +50,8 @@ $(function () { // Keep buttons disabled unless changed or not empty $('#username').on('keyup', function (event) { if ($('#username').val() !== '' && $('#username').val() !== current_username) { - if (event.keyCode == 13) { + if (event.keyCode == 13 || event.which == 13) { + this.blur(); current_username = updateUsername(socket) || current_username; } } |