Bug 220642
| Summary: | Long pressing on an img that has `-webkit-touch-callout: none` causes an extra mousedown to fire | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jarod Gowgiel <jarod.gowgiel> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | hi, megan_gardner, smoley, thorton, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 14 | ||
Jarod Gowgiel
On an iOS device, long pressing on a regular div fires two events: a touchstart, and then a touchend when the finger is released. Long pressing on an img element, however, fires three events: a touchstart, then a short while thereafter a mousedown, and finally a touchend. I've written up a trivial example to show this difference at https://codepen.io/JarodG/pen/zYKMeaJ
I'd expect that, with -webkit-touch-callout disabled (which prevents the image preview / save callout) the long press behavior would be the same between these two elements, especially since a regular tap fires the same events for both.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/73475898>
Smoley
On the iOS 14.4 beta I see only touchstart and touchend. If I hold the tap long enough I also see touchmove events but that occurs on both the div and the img element.
Jarod Gowgiel
I’m still able to reproduce this on iOS 15.1 on my device.