Bug 261390

Summary: touchevents don't work correctly in iframes
Product: WebKit Reporter: Gregg Tavares <gman>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: a_protyasha, richard_robinson2, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
repo-for-the-issue none

Gregg Tavares
Reported 2023-09-10 16:20:25 PDT
Created attachment 467630 [details] repo-for-the-issue Touchevents don't work correctly in iframes Repo: 1. Unzip the attached files and serve them (or maybe they work from file:, I didn't test) 2. Open "outer-works-kinda.html" in Safari iOS 3. Scroll down, try to drag the green square in the yellow area (this works) 4. Open "outer-broken.html" 5. Scroll down, try to drag the green square in the yellow area (this does not work) The only difference between the 2 files is in `outer-broken.html` these 2 lines exist <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> In outer-kinda-works they don't Note: if you remotely connect desktop Safari to iOS Safari on "outer-broken.html" and turn on/off a few CSSs (meaning mark them as off then re-mark them as on so that nothing should have actually changed) eventually the page will magically start working
Attachments
repo-for-the-issue (3.41 KB, application/zip)
2023-09-10 16:20 PDT, Gregg Tavares
no flags
Gregg Tavares
Comment 1 2023-09-10 16:23:12 PDT
note: you can open "touch events vs pointer events.html" directly and it will work just fine. Also, if you don't want to be bothered to unzip them they are available here https://greggman.github.io/doodles/test/prevent-scroll/outer-broken.html https://greggman.github.io/doodles/test/prevent-scroll/outer-kinda-works.html https://greggman.github.io/doodles/test/prevent-scroll/touch%20events%20vs%20pointer%20events.html Sorry about the names. The bug I'm reporting has nothing to do with preventing-scrolling NOR with pointer-events. those are separate issues. The issue here is not getting any touchevents.
Gregg Tavares
Comment 2 2023-09-10 16:36:54 PDT
iOS 16.6.0
Wenson Hsieh
Comment 3 2023-09-11 10:22:33 PDT
Interesting — I'm able to repro on iOS 17 as well. I was actually able to drag the green square on "outer-broken.html" for a brief moment, but it stopped working after scrolling the page a bit more. This might be related to UIGestureRecognizers on (and under) the web view being in a weird state; I'm unsure what could potentially cause this to happen only in iframes, though. Maybe the event regions are not being computed correctly..
Radar WebKit Bug Importer
Comment 4 2023-09-17 16:21:13 PDT
Note You need to log in before you can comment on or make changes to this bug.