-
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
textarea with required
attribute renders in invalid state in FF
#16402
Comments
I'm experiencing this as well |
Uh oh. There was a fix for this for inputs, but the textarea code path is different: react/packages/react-dom/src/client/ReactDOMInput.js Lines 269 to 277 in 0da7bd0
This probably needs to happen on the textarea side too. Probably somewhere in here: react/packages/react-dom/src/client/ReactDOMTextarea.js Lines 149 to 162 in 0da7bd0
I think I can fix this pretty quickly, but won't be able to get to it until later in the week if anyone else would like to pick it up. |
Just talked with @halvves about taking a stab at this! |
* prevent firefox marking required textareas invalid Bug was caused by an IE10/IE11 bugfix dealing with the placeholder attribute and textContent. Solved by avoiding the IE bugfix when textContent was empty. Closes #16402 * more explicit conditional check for textContent re: @philipp-spiess code review * clarify textarea test fixture's expected result better describe the behavior we are testing for re: @philipp-spiess code review
Bug
When a
textarea
has therequired
attribute it renders in the invalid state using FireFox.This behavior is visible here: https://codesandbox.io/s/rough-frog-f00ow. Remember to view it in FireFox.
I expect the required field to validate on form submit and not before.
I have tested this with FireFox 68 and 69 and React 16.8.6
This appears appears to be a re-occurrence of: #8395
The text was updated successfully, but these errors were encountered: