Handle more edge cases when setting the user's cursor after auto-formatting an input #1284
Labels
help wanted
Community contributors can implement this
ready
Ready for implementation
type: enhancement
New feature or request
work: frontend
Related to frontend code in the mathesar_ui directory
Milestone
Reproduce
Note: I'm using the │ character here to denote a user's cursor -- not to represent an actual text character.
NumberInput
componentBackspace
, turning the input into "1,000,0│0"Notes
In Cursor position in FormattedInput #1257 we added a function
getCursorPositionAfterReformat
which determines the cursor position. Fixing this issue will require modifying the logic within that function.That function has a unit test with a number of test cases already written but commented out because they do not pass.
The reproduction steps above correspond to the following test case:
The text was updated successfully, but these errors were encountered: