From 88e34394bd546fae00ff7dbaa41d9d4e67df7cdc Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 14 Sep 2016 12:49:01 +0200 Subject: [PATCH] [SDDM Theme] Select all and focus password field on error When logging in failed, focus the password field and select all, so you can start typing a new password thereafter. I did the same in the lock screen. There's a workaround for a bug which draws focus away from the password field on login but never put it back if logging in failed. Differential Revision: https://phabricator.kde.org/D2767 --- sddm-theme/Login.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sddm-theme/Login.qml b/sddm-theme/Login.qml index 86b9311ab..85546b4d3 100644 --- a/sddm-theme/Login.qml +++ b/sddm-theme/Login.qml @@ -62,6 +62,14 @@ SessionManagementScreen { event.accepted = true } } + + Connections { + target: sddm + onLoginFailed: { + passwordBox.selectAll() + passwordBox.forceActiveFocus() + } + } } PlasmaComponents.Button { id: loginButton