Andarist / react-textarea-autosize

<textarea /> component for React which grows with content
http://andarist.github.io/react-textarea-autosize/
MIT License
2.18k stars 244 forks source link

fix: Cursor not at the end of input when using autofocus with initial… #357

Closed Slowhand0309 closed 1 year ago

Slowhand0309 commented 1 year ago

Description

Fixed to move the caret position to the end of the character when autoFocus is true at the timing of onFocus.

Related Issues

346

Screen Capture

before after
changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 8b637f7017e580ef9daec91b40fb11892bc255b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Andarist commented 1 year ago

To the best of my knowledge - this is how a regular textarea works in browsers (at least in some of them). I don't want to change the native semantics beyond what this library was set to add on top of them (autosizing).

Slowhand0309 commented 1 year ago

@Andarist

To the best of my knowledge - this is how a regular textarea works in browsers (at least in some of them). I don't want to change the native semantics beyond what this library was set to add on top of them (autosizing).

Thanks for the reply. I see. I understand. It would indeed change the native semantics... Please close this Pull Request. 🙏