Workaround against display: inline bug in Safari#32822
Merged
sebmarkbage merged 3 commits intofacebook:mainfrom Apr 7, 2025
Merged
Workaround against display: inline bug in Safari#32822sebmarkbage merged 3 commits intofacebook:mainfrom
sebmarkbage merged 3 commits intofacebook:mainfrom
Conversation
|
Comparing: 6a7650c...9bba396 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
eps1lon
approved these changes
Apr 7, 2025
Collaborator
eps1lon
left a comment
There was a problem hiding this comment.
Does this introduce layout trash for every browser because of Safari?
Contributor
Author
|
Yes unless we want to do UA detection but that would also suffer from inconsistencies in some edge case where our application of the patch wouldn't yield exactly the same result. The worst bit is in gestures because to read the computed style we have to compute styling for the clones and currently that pass is interleave with inserting the clones so it needs to computes the styling again and again even if |
github-actions bot
pushed a commit
that referenced
this pull request
Apr 7, 2025
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. DiffTrain build for [365c031](365c031)
github-actions bot
pushed a commit
that referenced
this pull request
Apr 7, 2025
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. DiffTrain build for [365c031](365c031)
acdlite
pushed a commit
to vercel/next.js
that referenced
this pull request
Apr 7, 2025
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
feedthejim
pushed a commit
to vercel/next.js
that referenced
this pull request
May 14, 2025
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Safari has a bug where if you put a block element inside an inline element and the inline element has a
view-transition-nameassigned 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
blockorinline-blockautomatically 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.