dillon1000/react

Commit

Don't set the first option as selected in select tag with `size` attribute (#14242)

* Set 'size' attribute to select tag if it occurs before appending options

* Add comment about why size is assigned on select create. Tests

I added some more clarification for why size must be set on select
element creation:

- In the source code
- In the DOM test fixture
- In a unit test

* Use let, not const in select tag stub assignment
Browse files
Changed paths3 files
First-parent comparison
M fixtures/dom/src/components/fixtures/selects/index.js ModifiedM packages/react-dom/src/__tests__/ReactDOMSelect-test.js ModifiedM packages/react-dom/src/client/ReactDOMComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…