-
Notifications
You must be signed in to change notification settings - Fork 10.3k
iOS 13 Safari PWA div clicks only fire erratically #21690
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
Comments
@tn-5 thanks for contacting us. Can you provide us with a minimal repro project that demonstrates the issue so that we can help you out? |
To reproduce
To test this it must be accessible from an iPhone. So either deploy it somewhere or just run it locally, but listen on a port accessible by the iPhone, for example:
where xxx.xxx.xxx.xxx is the PC IP address accessible from the iPhone (on the same wifi network for example).
|
@tn-5 Sorry for the inconvenience. However, as far as I'm aware, this is not really a Blazor issue, but is rather a quirk of how Safari behaves on iOS in general. There are many, many other reports of people wondering about this when using other frameworks too (example, or for others, search the web for In general, Blazor isn't a polyfill library and doesn't try to normalize browser quirks such as this. However if you think there is a specific thing Blazor should do to make this specific thing better we'd definitely be open to considering it. |
I'm aware that Safari mobile (like all browsers) have quirks that you may need to work around. The thing that concerned me in this case it not that it does not work on Safari, but that there is a different between Safari mobile (as a website) and Safari mobile (as a PWA launched from the home screen). I suppose I was worried that there might be something about the way Blazor specifically registers the onclick events in PWA mode (or how the startup is done) that may affect this. In any case the workaround for this specific issue is to simply use button elements for clickable items. |
I've done further testing and I'm thinking it may be a Blazor specific issue. |
Blazor uses event delegation - that’s why it’s different and affects all event delegation systems. |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
When styling a div element as a clickable button in iOS and subsequently installing it as a PWA, the element only erratically responds to click events.
Tested on: iOS 13.4.1
Reproduce
Standard blazorwasm template (with pwa option), add following code to counter.razor:
Results (run from browser)
Clicking on any of the 3 elements result in the counter being in incremented
Results (when installed as a PWA - add to home screen on iPhone)
Only clicking #3 (the button) works reliably, the first two sometimes respond erratically and sometimes not at all.
The text was updated successfully, but these errors were encountered: