Bug 220642 - Long pressing on an img that has `-webkit-touch-callout: none` causes an extra mousedown to fire
Summary: Long pressing on an img that has `-webkit-touch-callout: none` causes an extr...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-14 17:00 PST by Jarod Gowgiel
Modified: 2022-02-15 16:58 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.