You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, in iOS Safari the hydratation fails if one number is detected as a phone number and auto-linked by the browser if it’s followed by an {#if} (and maybe other cases).
To reproduce see my repo in the other section, but it suffices to write this in a +page.svelte:
0601020304
{#iftrue}+{/if}
then open it in iOS Safari. The page is briefly shown with a blue link on the number (server-side rendering), then it becomes a blank page (hydratation fail). I guess this is because the JS is not expecting a link there.
For some reason the problem doesn’t happen if there is no space (0601020304{#if true}+{/if} ) or no {#if} (0601020304).
Disabling the browser auto-detection fixes the issue:
I’m not sure if this is fixable in Svelte, but at least if someone has this issue hopefully they’ll see this report without losing all the time I spent on it.
Edit: I forgot to write that this used to work in Svelte 4.
Describe the bug
Hello, in iOS Safari the hydratation fails if one number is detected as a phone number and auto-linked by the browser if it’s followed by an
{#if}
(and maybe other cases).To reproduce see my repo in the other section, but it suffices to write this in a
+page.svelte
:then open it in iOS Safari. The page is briefly shown with a blue link on the number (server-side rendering), then it becomes a blank page (hydratation fail). I guess this is because the JS is not expecting a link there.
For some reason the problem doesn’t happen if there is no space (
0601020304{#if true}+{/if}
) or no{#if}
(0601020304
).Disabling the browser auto-detection fixes the issue:
I’m not sure if this is fixable in Svelte, but at least if someone has this issue hopefully they’ll see this report without losing all the time I spent on it.
Edit: I forgot to write that this used to work in Svelte 4.
Reproduction
https://github.com/bfontaine/sveltekit-ios-phone-bug
Run it with
npm run dev -- --host 0.0.0.0
then open http://your_ip:5173/ in iOS Safari.Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: