From 56697ea9a4399ecaccf33ae3ae1a42283bdc9dc7 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 22 Sep 2017 18:47:05 -0230 Subject: Select all in to and from of send screens, instead of clearing on focus. --- ui/app/send.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'ui/app/send.js') diff --git a/ui/app/send.js b/ui/app/send.js index 8fab8a384..ac1ee0d84 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -123,14 +123,9 @@ SendTransactionScreen.prototype.renderFromInput = function (from, identities) { }) }, onBlur: () => this.setErrorsFor('from'), - onFocus: () => { + onFocus: event => { this.clearErrorsFor('from'), - this.state.newTx.from && this.setState({ - newTx: { - ...this.state.newTx, - from: '', - }, - }) + this.state.newTx.from && event.target.select() }, }), @@ -168,14 +163,9 @@ SendTransactionScreen.prototype.renderToInput = function (to, identities, addres }) }, onBlur: () => this.setErrorsFor('to'), - onFocus: () => { + onFocus: event => { this.clearErrorsFor('to') - this.state.newTx.to && this.setState({ - newTx: { - ...this.state.newTx, - to: '', - }, - }) + this.state.newTx.to && event.target.select() }, }), -- cgit