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 EventsAssignee: 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   

Description Jarod Gowgiel 2021-01-14 17:00:44 PST
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.
Comment 1 Radar WebKit Bug Importer 2021-01-21 17:01:12 PST
<rdar://problem/73475898>
Comment 2 Smoley 2021-01-29 15:14:07 PST
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.
Comment 3 Jarod Gowgiel 2022-02-15 16:58:47 PST
I’m still able to reproduce this on iOS 15.1 on my device.