1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Fix keyboard focus on the login page

This commit is contained in:
Joshua Goins 2023-08-18 22:16:45 -04:00
parent 01293edb60
commit b878b923b6

View file

@ -154,7 +154,13 @@ Controls.Control {
label: page.profile.account.isSapphire ? i18n("Password") : i18n("Square Enix Password") label: page.profile.account.isSapphire ? i18n("Password") : i18n("Square Enix Password")
echoMode: TextInput.Password echoMode: TextInput.Password
focus: true focus: true
onAccepted: otpField.clicked() onAccepted: {
if (otpField.visible) {
otpField.clicked();
} else {
loginButton.clicked();
}
}
text: page.profile.account.rememberPassword ? "abcdefg" : "" text: page.profile.account.rememberPassword ? "abcdefg" : ""
} }
@ -197,4 +203,6 @@ Controls.Control {
} }
} }
} }
Component.onCompleted: passwordField.forceActiveFocus()
} }