Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: provide more hydration mismatch coverage #12755

Merged
merged 15 commits into from
Aug 10, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Aug 6, 2024

Fixes #12737. I can't come up with a test because I don't know how to spoof iOS being wacky and transforming the HTML. However, I did test this fix against the issue with iOS changing the phone number on Safari iOS and can confirm it works – we provide the warning and also repair the DOM.

Copy link

changeset-bot bot commented Aug 6, 2024

🦋 Changeset detected

Latest commit: c30f53d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

Added a test and tweaked some of the logic a bit. There is another case that this doesn't cover — it's possible for things to get out of whack in a component that doesn't call $.reset. Having a tricky time distilling it into a test though

@Rich-Harris
Copy link
Member

Actually I think we should move the second failing test into a separate PR, since there's no sense in holding up a fix for the more common case. Opened #12791

@Rich-Harris Rich-Harris merged commit 19819d0 into main Aug 10, 2024
9 checks passed
@Rich-Harris Rich-Harris deleted the add-more-hydration-mismatch branch August 10, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5: Dynamically rendered string renders incorrectly on iOS WebKit if it contains a link
2 participants