dillon1000/react

Commit

Workaround against display: inline bug in Safari (#32822)

Safari has a bug where if you put a block element inside an inline
element and the inline element has a `view-transition-name` assigned it
finds it as duplicate names.

https://bugs.webkit.org/show_bug.cgi?id=290923

This adds a warning if we detect this scenario in dev mode.

For the case where it renders into a single block, we can model this by
making the parent either `block` or `inline-block` automatically to fix
the issue. So we do that to automatically cover simple cases like
`<a><div>...</div></a>`. This unfortunately causes layout/styling thrash
so we might want to delete it once the bug has been fixed in enough
Safari versions.
Browse files
Changed paths3 files
First-parent comparison
M fixtures/view-transition/src/components/Page.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-reconciler/src/ReactFiberApplyGesture.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…