Remove mouse area for text fields. use activeFocusOnPress property instead

This commit is contained in:
vladest 2017-09-29 17:14:35 +02:00
parent da3d5a92d9
commit 01a0b26b90

View file

@ -76,6 +76,8 @@ Item {
height: 50; height: 50;
echoMode: TextInput.Password; echoMode: TextInput.Password;
placeholderText: "enter current passphrase"; placeholderText: "enter current passphrase";
activeFocusOnPress: true
activeFocusOnTab: true
onFocusChanged: { onFocusChanged: {
if (focus) { if (focus) {
@ -85,14 +87,6 @@ Item {
} }
} }
MouseArea {
anchors.fill: parent;
onClicked: {
parent.focus = true;
sendSignalToWallet({method: 'walletSetup_raiseKeyboard'});
}
}
onAccepted: { onAccepted: {
passphraseField.focus = true; passphraseField.focus = true;
} }
@ -109,6 +103,8 @@ Item {
height: 50; height: 50;
echoMode: TextInput.Password; echoMode: TextInput.Password;
placeholderText: root.isShowingTip ? "" : "enter new passphrase"; placeholderText: root.isShowingTip ? "" : "enter new passphrase";
activeFocusOnPress: true
activeFocusOnTab: true
onFocusChanged: { onFocusChanged: {
if (focus) { if (focus) {
@ -118,14 +114,6 @@ Item {
} }
} }
MouseArea {
anchors.fill: parent;
onClicked: {
parent.focus = true;
sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
}
}
onAccepted: { onAccepted: {
passphraseFieldAgain.focus = true; passphraseFieldAgain.focus = true;
} }
@ -140,6 +128,8 @@ Item {
height: 50; height: 50;
echoMode: TextInput.Password; echoMode: TextInput.Password;
placeholderText: root.isShowingTip ? "" : "re-enter new passphrase"; placeholderText: root.isShowingTip ? "" : "re-enter new passphrase";
activeFocusOnPress: true
activeFocusOnTab: true
onFocusChanged: { onFocusChanged: {
if (focus) { if (focus) {
@ -149,14 +139,6 @@ Item {
} }
} }
MouseArea {
anchors.fill: parent;
onClicked: {
parent.focus = true;
sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
}
}
onAccepted: { onAccepted: {
focus = false; focus = false;
} }