aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-22 16:28:43 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-26 09:30:56 +0800
commiteae40e054418c195310224194d9435ccfbf14e46 (patch)
tree128cc4128c7859ceca664cc35da45cf82cce9134 /ui
parent2c474b0d6e487652cf16e224e19deb0bf68abedb (diff)
downloadtangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar.gz
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar.bz2
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar.lz
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar.xz
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.tar.zst
tangerine-wallet-browser-eae40e054418c195310224194d9435ccfbf14e46.zip
Able to change selections in to and from fields of send and send token.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/send-token/index.js1
-rw-r--r--ui/app/send.js20
2 files changed, 19 insertions, 2 deletions
diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js
index dd8ca6b9d..cc77c2699 100644
--- a/ui/app/components/send-token/index.js
+++ b/ui/app/components/send-token/index.js
@@ -181,6 +181,7 @@ SendTokenScreen.prototype.renderToAddressInput = function () {
to: e.target.value,
errors: {},
}),
+ onFocus: () => to && this.setState({ to: '' }),
}),
h('datalist#addresses', [
// Corresponds to the addresses owned.
diff --git a/ui/app/send.js b/ui/app/send.js
index 16fe470be..8fab8a384 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -123,7 +123,15 @@ SendTransactionScreen.prototype.renderFromInput = function (from, identities) {
})
},
onBlur: () => this.setErrorsFor('from'),
- onFocus: () => this.clearErrorsFor('from'),
+ onFocus: () => {
+ this.clearErrorsFor('from'),
+ this.state.newTx.from && this.setState({
+ newTx: {
+ ...this.state.newTx,
+ from: '',
+ },
+ })
+ },
}),
h('datalist#accounts', [
@@ -160,7 +168,15 @@ SendTransactionScreen.prototype.renderToInput = function (to, identities, addres
})
},
onBlur: () => this.setErrorsFor('to'),
- onFocus: () => this.clearErrorsFor('to'),
+ onFocus: () => {
+ this.clearErrorsFor('to')
+ this.state.newTx.to && this.setState({
+ newTx: {
+ ...this.state.newTx,
+ to: '',
+ },
+ })
+ },
}),
h('datalist#addresses', [