Skip to content

Fix jumping cursor bug#20

Open
gregplaysguitar wants to merge 9 commits intomainfrom
cursor-jump-bug
Open

Fix jumping cursor bug#20
gregplaysguitar wants to merge 9 commits intomainfrom
cursor-jump-bug

Conversation

@gregplaysguitar
Copy link
Contributor

@gregplaysguitar gregplaysguitar commented Feb 12, 2026

In production react, when mvc state provides the value to a controlled input, the cursor jumps to the end on every keystroke. This only happens in production, not development, due to React's batching behaviour. Repro with yarn demo:production

cursor_jump.mov

This PR

  1. Adds a playwright test suite to reproduce the problem
  2. Inlines https://github.com/aha-app/react-easy-state which is not used anywhere else
  3. Fixes the problem by saving and restoring the cursor position in the view code

The actual fix is in eb145bc

@gregplaysguitar gregplaysguitar changed the title Cursor jump bug Fix jumping cursor bug Feb 12, 2026
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.

1 participant