-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
deleting decimal values in number inputs #7781
Comments
Hey @ccorcos! I've been working on fixes for this issue (#7750, #7359). I listed quite a few cases here (and would be happy to add new cases to that list): #7253 (comment) Quite an annoying issue. I've got things sorted out for uncontrolled inputs, but there are still some outstanding issues to figure out for controlled inputs (#7359 (comment)). The gist of it is that the value attribute is assigned on every value change, which isn't compatible with Chrome's number input. Would you be willing to take a look there and help me brain storm? |
@aweary ack, sorry! Good timing :) |
@nhunzaker awesome! just commented in the other PR. |
So I already chimed in about the problems here:
#6556
But there's another issue where you type out your number, such as
123.45
and then start deleting and once you delete that 4, the cursor jobs all the way over to the lefthttps://jsfiddle.net/wmhrdcad/
I think the problem has to do with the fact that
\d+\.
is not considered a valid number. I'm not sure if this came from react or the browser:The text was updated successfully, but these errors were encountered: