Skip to content

Commit

Permalink
fix(Input): add calling 'selectAll' via 'setTimeout'
Browse files Browse the repository at this point in the history
  • Loading branch information
lossir committed Jul 9, 2019
1 parent 7031afb commit f2b7226
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/retail-ui/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ class Input extends React.Component<InputProps, InputState> {
});

if (this.props.selectAllOnFocus) {
this.selectAll();
// https://github.com/facebook/react/issues/7769
setTimeout(this.selectAll, 0);
}

if (this.props.onFocus) {
Expand Down

0 comments on commit f2b7226

Please sign in to comment.