Bug 273371

Summary: Inconsistency: click event inside dialog Shadow DOM on iOS
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, a_protyasha, cdumez, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: iOS 17   
Attachments:
Description Flags
Example HTML demonstrating the issue none

Jeff Johnson
Reported 2024-04-28 05:19:19 PDT
Created attachment 471188 [details] Example HTML demonstrating the issue Steps to reproduce: 1. Open the attached example HTML 2. Open the web inspector 3. Click the "Shadow?" checkbox 4. Click the link Expected results: "click shadow button" is not logged in the console Actual results: "click shadow button" is logged in the console The expected results occur for all desktop web browsers: Safari, Chrome, Firefox. Mobile Safari's behavior is inconsistent with those. Discussion: The pointerdown event on the link calls preventDefault and shows a modal dialog. The example HTML has two dialogs, one of which is chosen by the Shadow? checkbox. Each dialog has a button inside, but one button is inside the Shadow DOM and one not. When the button is not inside the Shadow DOM, it doesn't receive a click event as a result of clicking on the link. When the button is inside the Shadow DOM, it doesn't receive a click event on desktop either but does on iOS.
Attachments
Example HTML demonstrating the issue (1.30 KB, text/html)
2024-04-28 05:19 PDT, Jeff Johnson
no flags
Radar WebKit Bug Importer
Comment 1 2024-05-05 05:20:14 PDT
Ahmad Saleem
Comment 2 2024-05-06 03:58:42 PDT
@Jeff - by any chance, if you know whether it is recent regression?
Jeff Johnson
Comment 3 2024-05-06 06:21:03 PDT
(In reply to Ahmad Saleem from comment #2) > @Jeff - by any chance, if you know whether it is recent regression? It's not. I can reproduce in the iOS 16.4 simulator.
Note You need to log in before you can comment on or make changes to this bug.