Skip to content

iOS 13 Safari PWA div clicks only fire erratically #21690

Closed
@tn-5

Description

@tn-5

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:

<div class="bg-primary" @onclick="IncrementCount" style="height:40px;">
    <p>Button 1</p>            
</div>
<br>
<div class="bg-primary" @onclick="IncrementCount" style="height:40px;cursor: pointer;">
    <p>Button 2</p>            
</div>
<br>
<button class="bg-primary" @onclick="IncrementCount" style="height:40px;cursor: pointer;">
    <p>Button 3</p>            
</button>

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.

Metadata

Metadata

Labels

✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor Components

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions