Skip to content

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented Mar 1, 2022

regression fix for mui/material-ui#31263

The src property on the dom element will return a fully qualified name and this does not match the dom
src attribute or the props provided to react. instead of reading from the element and re-assigning the property we
assign the property from props which is how it was initially assigned during the render

I've added a test to guard against future regression

@sizebot
Copy link

sizebot commented Mar 1, 2022

Comparing: feefe43...f92f21f

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 131.46 kB 131.46 kB = 42.05 kB 42.05 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.12 kB 136.12 kB = 43.41 kB 43.41 kB
facebook-www/ReactDOM-prod.classic.js = 435.08 kB 435.09 kB = 79.62 kB 79.61 kB
facebook-www/ReactDOM-prod.modern.js = 421.59 kB 421.59 kB = 77.60 kB 77.60 kB
facebook-www/ReactDOMForked-prod.classic.js = 435.08 kB 435.09 kB = 79.62 kB 79.62 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against f92f21f

The src property on the dom element will return a fully qualified name and this does not match the dom
src attribute or the props provided to react. instead of reading from the element and re-assigning the property we
assign the property from props which is how it was initially assigned during the render
@gnoff gnoff force-pushed the bugfix-assign-proper-src branch from 05baf8f to f92f21f Compare March 1, 2022 23:09
@sebmarkbage sebmarkbage merged commit f0dd459 into facebook:main Mar 1, 2022
@gnoff gnoff deleted the bugfix-assign-proper-src branch March 1, 2022 23:25
@Jack-Works
Copy link
Contributor

is this included in the https://www.npmjs.com/package/react/v/18.0.0-rc.1?

@eps1lon
Copy link
Collaborator

eps1lon commented Mar 2, 2022

is this included in the npmjs.com/package/react/v/18.0.0-rc.1?

@Jack-Works This is a fix for a regression introduced in rc.1. However, it's included in 18.0.0-rc.1-next-f0dd459e0-20220301

himanshiLt pushed a commit to himanshiLt/react that referenced this pull request Mar 10, 2022
)

The src property on the dom element will return a fully qualified name and this does not match the dom
src attribute or the props provided to react. instead of reading from the element and re-assigning the property we
assign the property from props which is how it was initially assigned during the render

Co-authored-by: Josh Story <[email protected]>
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
)

The src property on the dom element will return a fully qualified name and this does not match the dom
src attribute or the props provided to react. instead of reading from the element and re-assigning the property we
assign the property from props which is how it was initially assigned during the render

Co-authored-by: Josh Story <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants