From a19a549879504d12ec10955bc550c50294f996ec Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Thu, 25 Sep 2014 10:42:35 +1000 Subject: keyup event changed to input prevents doing unnecessary calculations when pressing ctrl or arrow-keys etc. --- bip39-standalone.html | 14 +++++++------- src/js/index.js | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bip39-standalone.html b/bip39-standalone.html index 591cdce..9782d11 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html @@ -22736,15 +22736,15 @@ WORDLISTS = { function init() { // Events - DOM.phrase.on("keyup", delayedPhraseChanged); - DOM.passphrase.on("keyup", delayedPhraseChanged); + DOM.phrase.on("input", delayedPhraseChanged); + DOM.passphrase.on("input", delayedPhraseChanged); DOM.generate.on("click", generateClicked); DOM.more.on("click", showMore); - DOM.bip32path.on("keyup", bip32Changed); - DOM.bip44purpose.on("keyup", bip44Changed); - DOM.bip44coin.on("keyup", bip44Changed); - DOM.bip44account.on("keyup", bip44Changed); - DOM.bip44change.on("keyup", bip44Changed); + DOM.bip32path.on("input", bip32Changed); + DOM.bip44purpose.on("input", bip44Changed); + DOM.bip44coin.on("input", bip44Changed); + DOM.bip44account.on("input", bip44Changed); + DOM.bip44change.on("input", bip44Changed); DOM.tab.on("click", tabClicked); DOM.indexToggle.on("click", toggleIndexes); DOM.addressToggle.on("click", toggleAddresses); diff --git a/src/js/index.js b/src/js/index.js index cee8ffb..7f39ad2 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -35,15 +35,15 @@ function init() { // Events - DOM.phrase.on("keyup", delayedPhraseChanged); - DOM.passphrase.on("keyup", delayedPhraseChanged); + DOM.phrase.on("input", delayedPhraseChanged); + DOM.passphrase.on("input", delayedPhraseChanged); DOM.generate.on("click", generateClicked); DOM.more.on("click", showMore); - DOM.bip32path.on("keyup", bip32Changed); - DOM.bip44purpose.on("keyup", bip44Changed); - DOM.bip44coin.on("keyup", bip44Changed); - DOM.bip44account.on("keyup", bip44Changed); - DOM.bip44change.on("keyup", bip44Changed); + DOM.bip32path.on("input", bip32Changed); + DOM.bip44purpose.on("input", bip44Changed); + DOM.bip44coin.on("input", bip44Changed); + DOM.bip44account.on("input", bip44Changed); + DOM.bip44change.on("input", bip44Changed); DOM.tab.on("click", tabClicked); DOM.indexToggle.on("click", toggleIndexes); DOM.addressToggle.on("click", toggleAddresses); -- cgit v1.2.3