-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
4 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/perseus-editor": patch | ||
--- | ||
|
||
[Interactive Graph Editor] Stop cursor jumps in number input fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters