From 936955e73783ee6f5c20b4e921fa62ad1ab6280d Mon Sep 17 00:00:00 2001 From: Pascal Precht <445106+PascalPrecht@users.noreply.github.com> Date: Thu, 12 May 2022 12:35:49 +0200 Subject: [PATCH] fix(StatusSeedPhraseInput): ensure `doneInsertingWord` is emitted When `completeWorldFill()` was called, we relied on it to implicitly emit `doneInsertingWord()` via the seed phrase input's text change event. However, it turns out `doneInsertingWord` is only emitted by the component when the filtered suggestion list has one item. In practice this isn't always the case, for example the word "fun" might be desired, in which case the suggestion list includes "fun" and "funny". This introduces some third order effects, such that in Status Desktop the view doesn't get notified that a word has been inserted, which then causes it invalidate the mnemonic (or rather, it keeps the confirm button disabled because it thinks there were less words inserted than required). To account for this we always explicitly emit the `doneInsertWord` signal. --- src/StatusQ/Controls/StatusSeedPhraseInput.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StatusQ/Controls/StatusSeedPhraseInput.qml b/src/StatusQ/Controls/StatusSeedPhraseInput.qml index ea6c8103..de4cf096 100644 --- a/src/StatusQ/Controls/StatusSeedPhraseInput.qml +++ b/src/StatusQ/Controls/StatusSeedPhraseInput.qml @@ -212,8 +212,8 @@ Item { function completeWordFill(seedWord) { seedWordInput.input.edit.text = seedWord.trim(); - // Changing the text of the input triggers the onTextChanged, thus signalling doneInsertingWord if the condition passes seedWordInput.input.edit.cursorPosition = seedWordInput.text.length; + root.doneInsertingWord(seedWord.trim()); } clip: true