dillon1000/react
Commit
Browse files Extend input type check in selection capabilities (#12062) (#12135)
* Do not set selection when prior selection is undefined (#12062) `restoreSelection` did not account for input elements that have changed type after the commit phase. The new `text` input supported selection but the old `email` did not and `setSelection` was incorrectly trying to restore `null` selection state. We also extend input type check in selection capabilities to cover cases where input type is `search`, `tel`, `url`, or `password`. * Add link to HTML spec for element types and selection * Add reset button to ReplaceEmailInput This commit adds a button to restore the original state of the ReplaceEmailInput fixture so that it can be run multiple times without refreshing the page.
Changed paths3 files
First-parent comparisonfixtures/dom/src/components/fixtures/text-inputs/ReplaceEmailInput.js AddedM fixtures/dom/src/components/fixtures/text-inputs/index.js ModifiedM packages/react-dom/src/client/ReactInputSelection.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…