fix(SeedPhraseInput): fix lost focus after typing one character

Relates to: https://github.com/status-im/status-desktop/issues/4955
This commit is contained in:
Alexandra Betouni 2022-03-18 22:50:53 +02:00 committed by Michał Cieślak
parent 93e5357027
commit 18fddf7289
1 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,12 @@ Item {
property ListModel filteredList: ListModel { }
signal doneInsertingWord(string word)
onActiveFocusChanged: {
if (root.activeFocus) {
seedWordInput.input.edit.forceActiveFocus();
}
}
StatusInput {
id: seedWordInput
implicitWidth: parent.width
@ -115,7 +121,7 @@ Item {
onClicked: {
seedWordInput.text = seedWord;
seedWordInput.input.edit.cursorPosition = seedWordInput.text.length;
root.doneInsertingWord(seedWord);
root.doneInsertingWord(seedWordInput.text);
seedSuggestionsList.model = 0;
}
}