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
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.
iOS 16.6.0
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..
<rdar://problem/115632722>