OSDN Git Service

[更新]:セクションセレクトで選択されたダイヤログのフォーカスを自動で解除+escでログイン画面に移動した際に自動でフォーカス
authornaoko1010hh <naoko561010@gmail.com>
Mon, 2 Mar 2020 13:49:57 +0000 (22:49 +0900)
committernaoko1010hh <naoko561010@gmail.com>
Mon, 2 Mar 2020 13:49:57 +0000 (22:49 +0900)
js/splashscreen.js

index e3fd892..25081da 100644 (file)
@@ -361,10 +361,14 @@ class SplashScreen {
         this._open();
         break;
         case 27: // ESC key
-        if (this._state == "open")
-        this._close();
-        else if (this._state == "closed")
-        this._open();
+        if (this._state == "open"){
+        if(document.activeElement){
+          document.activeElement.blur();
+        }
+        this._close();}
+        else if (this._state == "closed"){
+        document.getElementById("inputPassword").focus();
+        this._open();}
         break;
         default:
         // // if (this._state == "closed")