mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-02 06:26:10 -04:00
Makes username input blur on pressing enter
This commit is contained in:
parent
d1cada0f7e
commit
e7de93cd84
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue