Skip to content

Commit

Permalink
fix: Text input cursor jumps to first position when writing long text (
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishBarvaliya authored May 27, 2023
1 parent 23451e3 commit 422ffb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/TextInput/TextInput.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TextInput extends React.Component {
if (props.multiline !== this.props.multiline) {
const node = props.forwardedRef.current;
node.focus();
if (this.props.value) node.setSelectionRange(this.props.value.length, this.props.value.length);
}
}

Expand Down

0 comments on commit 422ffb2

Please sign in to comment.