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

Reactivity not working on safari v12.5.7 #11869

Open
cocoliliace opened this issue Jun 1, 2024 · 3 comments
Open

Reactivity not working on safari v12.5.7 #11869

cocoliliace opened this issue Jun 1, 2024 · 3 comments

Comments

@cocoliliace
Copy link

cocoliliace commented Jun 1, 2024

Describe the bug

(re-opening of sveltejs/learn.svelte.dev#602 because it was misunderstood and incorrectly transferred to sveltejs/learn.svelte.dev).

Variables do not update and no reactivity-related feature works, on ios safari with software version 12.5.7.

By not working I mean nothing changes when the variables are supposed to update.

Here is a screen recording of the behaviour on ipod. The button flashing is when I clicked on the button:

<script>
	let count = 0;

	function increment() {
		count += 1;
	}
</script>

<button on:click={increment}>
	Clicked {count}
	{count === 1 ? 'time' : 'times'}
</button>
E3DF33D2-2B1B-4E6C-BA2E-B17F7AD0D7F1.MOV

Reproduction

https://git.sr.ht/~liliace/reactive-example

This is a skeleton project from running pnpm create svelte@latest and copying the code from https://learn.svelte.dev/tutorial/reactive-assignments into src/routes/+page.svelte.

I believe it is an issue with the reactivty part and not the on:click (or at least not just on:click) because using a setInterval to update the variable also works on firefox but not on safari. My other projects using other reactivity code like input binding also have the same issue.

This report is mean for svelte and not learn.svelte.dev. I am just using the code on learn.svelte.dev to reproduce this to show that the bug exists on official code examples.

Logs

Unfortunately there are no error logs on mobile safari

System Info

Unfortunately cannot run this on ipod. Below is the system info hosting the local dev server:

  System:
    OS: Linux 6.8 Alpine Linux
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 10.69 GB / 15.31 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 21.7.2 - /usr/bin/node
    npm: 10.5.1 - /usr/bin/npm
    pnpm: 8.15.6 - /usr/bin/pnpm
  npmPackages:
    svelte: ^4.2.7 => 4.2.12 (tried 5.0.0-next.1 and failed too)

It is a gen 6 ipod, with software version 12.5.7, running safari.

Severity

blocking all usage of svelte

@cocoliliace
Copy link
Author

This may be difficult to reproduce and work on due to the hardware requirement. Although I probably can't contribute much on the code because of my lack of understanding of the internal code and browser differences, I can help test different changes and report the behaviour if anyone has some guesses or starting directions.

@gterras
Copy link

gterras commented Jun 10, 2024

Probably duplicate of #10438

@cocoliliace
Copy link
Author

cocoliliace commented Jun 10, 2024

I believe this is a different issue. Contrary to #10438,

  • the error I am reporting does not cause the page to be blank. The page still renders but is just unreactive.
  • this exists on svelte 4 and 5, not just 5.
  • this works on ios 15.0. It is the older versions that break.

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

No branches or pull requests

2 participants