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

[@mantine/core] fix: NumberInput cursor no jump to end when pressing backspace on pos 0 #6072

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

jvllmr
Copy link
Contributor

@jvllmr jvllmr commented Apr 12, 2024

fixes #6056

See this more or less as a draft.
The solution is a bit ... and I don't really know why the accessibility tests don't accept type="number" :(
Maybe it would be a better issue to solve for react or the browsers.

@jvllmr jvllmr marked this pull request as draft April 12, 2024 20:38
@jvllmr jvllmr marked this pull request as ready for review April 14, 2024 19:43
@jvllmr
Copy link
Contributor Author

jvllmr commented Apr 14, 2024

I found a better solution! 🥳

Note that it wouldn't work with the onKeyDown event handler because it takes place after the cursor pos changed.

@jvllmr jvllmr changed the title [@mantine/core] fix: NumberInput no jump to right when pressing backspace on pos 0 [@mantine/core] fix: NumberInput cursor no jump to end when pressing backspace on pos 0 Apr 14, 2024
@rtivital rtivital merged commit e73814c into mantinedev:master Apr 23, 2024
1 check passed
@rtivital
Copy link
Member

Thanks!

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.

NumberInput: Cursor jumps to the end when pressing backspace with cursor on the very left
2 participants