Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move cursor to end of text area when text is changed #823

Merged
merged 3 commits into from
Jan 14, 2025
Merged

Conversation

PoignardAzur
Copy link
Contributor

This matches the behavior of other frameworks in similar situations.

This matches the behavior of other frameworks in similar situations.
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree here. If you're calling reset text, the user isn't actively editing.

@PoignardAzur PoignardAzur requested a review from DJMcNab January 14, 2025 17:10
@PoignardAzur PoignardAzur changed the title Move cursor to end of text are when text is changed Move cursor to end of text area when text is changed Jan 14, 2025
Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that when the text changes, the cursor should go to the end.
What I'm not sure about is moving the cursor to the end when losing focus. I checked and on the web the position is retained when tabbing off of a textbox and tabbing back to it.

@PoignardAzur
Copy link
Contributor Author

Yeah, and now that I think about it, the case I cared about (lose focus, text changes, get focus back) already gets the behavior I want (cursor is at the end) with the first commit.

I'll remove the second commit.

@PoignardAzur PoignardAzur added this pull request to the merge queue Jan 14, 2025
Merged via the queue into main with commit ba68c26 Jan 14, 2025
17 checks passed
@PoignardAzur PoignardAzur deleted the cursor_end branch January 14, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants