Avoid new bip39 mnemonic when bip85 index changed

Closes #634
This commit is contained in:
Ian Coleman
2023-07-13 09:42:31 +10:00
parent e2fdc5b942
commit 52e8f25e11

View File

@@ -607,6 +607,14 @@
if (isUsingOwnEntropy()) {
return;
}
// Pressing enter on BIP85 index field triggers generate click event.
// See https://github.com/iancoleman/bip39/issues/634
// To cancel the incorrect generation process, stop here if generate is
// not focused.
var buttonIsFocused = DOM.generate[0].contains(document.activeElement);
if (!buttonIsFocused) {
return;
}
clearDisplay();
showPending();
setTimeout(function() {