You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Interactive Graph Editor] Stop cursor jumps in number input fields (#1912)
## Summary:
In order to stop cursor jumps in number fields, up I'm updating the ScrolllessNumberTextField
component to have part of the implementation of EditableControlledInput, which makes sure that
the input stays consistent until blurred.
Issue: https://khanacademy.atlassian.net/browse/LEMS-2303
## Test plan:
- Go to http://localhost:6006/?path=/story/perseuseditor-widgets-interactive-graph--interactive-graph-segments
- Scroll down to the start coords for the segments
- Clear an input and type in ".5"
- Confirm that it does NOT auto-update to 0.5 immediately
- Confirm that it auto-updates to 0.5 after moving focus off the input
- Type in "1.5"
- Move the cursor right before the "."
- Press backspace
- Confirm that the cursor does not jump
## Before and after demos
Before
https://github.com/user-attachments/assets/66c0e69d-ed12-45a7-9527-26854a676ae7
After
https://github.com/user-attachments/assets/a1e396cf-7b62-43d4-8e00-006b78e6c69a
Author: nishasy
Reviewers: benchristel, catandthemachines, anakaren-rojas
Required Reviewers:
Approved By: benchristel
Checks: ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald
Pull Request URL: #1912
0 commit comments