Skip to content

Commit

Permalink
[更新]:コントロール+Aで全選択&途中入力ごescしたあとに再度入力しようとしたときに全選択するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
naoko1010hh committed Mar 3, 2020
1 parent 556c732 commit 6e66dc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/splashscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ class SplashScreen {
case 13: // Enter key
if (this._state == "closed")
document.getElementById("inputPassword").focus();
$('#inputPassword').select();
this._open();
break;
case 27: // ESC key
Expand All @@ -369,6 +370,7 @@ class SplashScreen {
this._close();}
else if (this._state == "closed"){
document.getElementById("inputPassword").focus();
$('#inputPassword').select();
this._open();}
break;
default:
Expand Down
7 changes: 6 additions & 1 deletion js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $(greeter).on("ready", function(e) {
});

// Bind listener to the password box
$password.keypress((e) => {
$password.keydown((e) => {
// user has typed, remove placeholder and invalid class
$password.prop("placeholder", "").removeClass("invalid");

Expand All @@ -58,6 +58,11 @@ $(greeter).on("ready", function(e) {
greeter.auth(username, pass);
}
}

else if (e.keyCode==65 && e.ctrlKey) {
$('#inputPassword').select();
}
console.log(e.ctrlKey);

});

Expand Down

0 comments on commit 6e66dc5

Please sign in to comment.