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.
This commit is contained in:
parent
457e5fe4af
commit
936955e737
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue