OSDN Git Service

[更新]:セクションセレクトで選択されたダイヤログのフォーカスを自動で解除+escでログイン画面に移動した際に自動でフォーカス
[alterlinux/lightdm-webkit2-theme-alter.git] / 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")