dillon1000/react
Commit
Browse files Do not assign node.value on input creation if no change will occur (#12925)
This commit fixes an issue where assigning an empty string to required text inputs triggers the invalid state in Firefox (~60.0.1). It does this by first comparing the initial state value to the current value property on the text element. This: 1. Prevents the validation issue 2. Avoids an extra DOM Mutation in some cases
Changed paths2 files
First-parent comparisonfixtures/dom/src/components/fixtures/text-inputs/index.js ModifiedM packages/react-dom/src/client/ReactDOMFiberInput.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…