We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There seems to be a bug in the way React interfaces with controlled inputs of type number
If the input contains an invalid number (let's say --2 or 2++), then trying to clear the input value by setting it to an empty string does nothing.
You can check an example to reproduce there: https://jsfiddle.net/96bnn12r/2/ The onChange handler will set the controlled value to the value returned by ev.target.value. In the case of an invalid value, the input returns an empty string (as per html spec https://html.spec.whatwg.org/multipage/forms.html#states-of-the-type-attribute 4.10.5.1.12) so this should actually clear the input but the invalid input stays.
When setting the input value to an empty string after entering an invalid value, it should clear the input content not keep the invalid value.
Seen in React 0.14.8, 15.0.1, 15.1.0 on OSX Chrome v50, Firefox 46.0.1
The text was updated successfully, but these errors were encountered:
Duplicate of #6556, related to #6368
Sorry, something went wrong.
No branches or pull requests
There seems to be a bug in the way React interfaces with controlled inputs of type number
If the input contains an invalid number (let's say --2 or 2++), then trying to clear the input value by setting it to an empty string does nothing.
You can check an example to reproduce there: https://jsfiddle.net/96bnn12r/2/
The onChange handler will set the controlled value to the value returned by ev.target.value.
In the case of an invalid value, the input returns an empty string (as per html spec https://html.spec.whatwg.org/multipage/forms.html#states-of-the-type-attribute 4.10.5.1.12) so this should actually clear the input but the invalid input stays.
When setting the input value to an empty string after entering an invalid value, it should clear the input content not keep the invalid value.
Seen in React 0.14.8, 15.0.1, 15.1.0 on OSX Chrome v50, Firefox 46.0.1
The text was updated successfully, but these errors were encountered: