Fix active focus issue

This commit is contained in:
Zach Fox 2018-02-20 13:19:31 -08:00
parent eb29bdf5d2
commit fd6f4b569f

View file

@ -75,8 +75,6 @@ Item {
// TODO: Fix this unlikely bug // TODO: Fix this unlikely bug
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible) {
passphraseField.error = false;
passphraseField.focus = true;
sendSignalToParent({method: 'disableHmdPreview'}); sendSignalToParent({method: 'disableHmdPreview'});
} else { } else {
sendSignalToParent({method: 'maybeEnableHmdPreview'}); sendSignalToParent({method: 'maybeEnableHmdPreview'});
@ -206,6 +204,14 @@ Item {
placeholderText: "passphrase"; placeholderText: "passphrase";
activeFocusOnPress: true; activeFocusOnPress: true;
activeFocusOnTab: true; activeFocusOnTab: true;
onVisibleChanged: {
if (visible) {
error = false;
focus = true;
forceActiveFocus();
}
}
onFocusChanged: { onFocusChanged: {
root.keyboardRaised = focus; root.keyboardRaised = focus;