Skip to content

Commit

Permalink
Support pressing enter on the keyboard for login
Browse files Browse the repository at this point in the history
Keyboard focused users typically press <TAB> to navigate between input
fields and press <ENTER> to submit the form. Upon pressing <ENTER> in
the login dialog, automatically perform the login action.
  • Loading branch information
n6prk committed Oct 12, 2024
1 parent 1762034 commit 7195b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel"
aria-hidden="true" data-bs-backdrop="static" data-bs-target="#staticBackdrop">
<div class="modal-dialog">
<form id="loginBox">
<form id="loginBox" onsubmit="doLogin(); return false;">
<div id="login-modal-content" class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel">Login</h5>
Expand Down Expand Up @@ -104,7 +104,7 @@ <h5 class="modal-title" id="loginModalLabel">Login</h5>
</div>
<div id="login-modal-footer" class="modal-footer mt-2">
<input type="hidden" id="login-action" name="action" value="login">
<button type="button" class="btn btn-secondary" onclick="doLogin()">Login</button>
<button type="submit" class="btn btn-secondary">Login</button>
<button type="button" class="btn btn-secondary" onclick="clearLogin()" data-bs-dismiss="modal">Cancel</button>
</div>
</div>
Expand Down

0 comments on commit 7195b43

Please sign in to comment.