summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/components/AccountInput.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/app/components/AccountInput.js b/app/components/AccountInput.js
index 56097f5e74..0f72c02d17 100644
--- a/app/components/AccountInput.js
+++ b/app/components/AccountInput.js
@@ -128,7 +128,7 @@ export default class AccountInput extends Component {
}
onSelect(e) {
- const ref = this._input;
+ const ref = e.target;
let start = ref.selectionStart;
let end = ref.selectionEnd;
@@ -149,14 +149,13 @@ export default class AccountInput extends Component {
}
onRef(ref) {
- this._input = ref;
- if(ref) {
- const { value, selectionRange } = this.state;
- const domRange = this.toDomSelection(value, selectionRange);
- // if(ref.selectionStart !== domRange[0] || ref.selectionEnd !== domRange[1]) {
- ref.setSelectionRange(domRange[0], domRange[1]);
- // }
- }
+
+ const { value, selectionRange } = this.state;
+ const domRange = this.toDomSelection(value, selectionRange);
+ // if(ref.selectionStart !== domRange[0] || ref.selectionEnd !== domRange[1]) {
+ ref && ref.setSelectionRange(domRange[0], domRange[1]);
+ // }
+
}
render() {