From 9fc93b8db2dd9e927f0ad2da07e56a9d8d6cae31 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 1 Jun 2020 10:36:06 -0400 Subject: [PATCH] fix: genKey binding and focus --- ui/onboarding/Login.qml | 9 +++++---- ui/shared/Input.qml | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/onboarding/Login.qml b/ui/onboarding/Login.qml index b9baf10438..ddcbf59914 100644 --- a/ui/onboarding/Login.qml +++ b/ui/onboarding/Login.qml @@ -7,12 +7,14 @@ import "../shared" import "../imports" SwipeView { + property alias btnGenKey: btnGenKey + id: swipeView anchors.fill: parent currentIndex: 0 onCurrentItemChanged: { - currentItem.txtPassword.focus = true + currentItem.txtPassword.textField.focus = true } Item { @@ -135,9 +137,8 @@ SwipeView { anchors.leftMargin: Theme.padding anchors.left: parent.left anchors.right: parent.right - otherProps: { - this.textField.focus = true - this.textField.focus + + Component.onCompleted: { this.textField.echoMode = TextInput.Password } Keys.onReturnPressed: { diff --git a/ui/shared/Input.qml b/ui/shared/Input.qml index d0404d50aa..054af28a5e 100644 --- a/ui/shared/Input.qml +++ b/ui/shared/Input.qml @@ -17,7 +17,6 @@ Item { inputValue.forceActiveFocus(Qt.MouseFocusReason) } readonly property int labelMargin: 7 - property var otherProps // Only used to assign stuff to textField id: inputBox height: inputRectangle.height + (hasLabel ? inputLabel.height + labelMargin : 0)