aboutsummaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rw-r--r--theme/components/Credentials.qml13
1 files changed, 12 insertions, 1 deletions
diff --git a/theme/components/Credentials.qml b/theme/components/Credentials.qml
index f565474..f6fa0bf 100644
--- a/theme/components/Credentials.qml
+++ b/theme/components/Credentials.qml
@@ -45,7 +45,16 @@ Item {
}
onStageChanged: focusStage()
- Component.onCompleted: focusStage()
+
+ // The greeter creates the QML before it shows the view, so a focus call at
+ // component completion lands while the window is still hidden and is
+ // dropped. Ask again once the view is on screen; from then on the field's
+ // focus binding follows the stage.
+ Timer {
+ interval: 200
+ running: true
+ onTriggered: creds.focusStage()
+ }
// Back chevron, password stage only. The width animates so the slot grows
// and shrinks with it.
@@ -147,6 +156,7 @@ Item {
height: slot.height
text: userModel.lastUser !== undefined ? userModel.lastUser : ""
placeholderText: "Username"
+ focus: !creds.passwordStage
activeFocusOnTab: !creds.passwordStage
font.family: "Noto Sans"
color: config.stringValue("text")
@@ -177,6 +187,7 @@ Item {
height: slot.height
echoMode: TextInput.Password
placeholderText: "Password"
+ focus: creds.passwordStage
activeFocusOnTab: creds.passwordStage
font.family: "Noto Sans"
color: config.stringValue("text")