Interacting with any of the _output results_ of the examples on svelte.dev, on the front page or in the tutorial, using up-to-date iPad/iPhone on Mobile Safari fails.
It’s as if the on:click handlers aren’t firing on taps.
This page is a good example: https://svelte.dev/tutorial/updating-arrays-and-objects. Tapping the ”Add a number” button does nothing.
Sounds like a dupe of #2499
I don't think this is a dupe.
I just tried the https://svelte.dev/tutorial/updating-arrays-and-objects tutorial and the button is not working on latest Chrome as well, it's not just mobile/Safari.
Are you experiencing #2452?
It's worth noting that click events do not work properly on touchscreens when viewing the homepage. Specifically, the button click event doesn't fire on iOS.
https://github.com/sveltejs/svelte/issues/2499#issuecomment-486505844
Did some debugging and found the cause: the "Result / JS output / CSS output" .tab-content elements are hidden and shown using opacity. Since the "Result" tab is the first one, it's actually sitting behind the other two tabs, which are intercepting its taps.
Now, the hidden tabs do have pointer-events: none, which should avoid this issue, but apparently not in Mobile Safari. Could be a bug or a security feature?
A quick fix would be:
opacity: 0/1 and pointer-events: none/all from .tab-contentvisibility: hidden/visibleHi @jonikorpi I just got to the same conclusion: this has to be fixed in the repl repo though, want to open a PR there?
@jonikorpi we've applied your suggestions as a temporary fix on the site while we fix th repl itself, thanks! 👍
Most helpful comment
Sounds like a dupe of #2499