|Summary:||Safari on iOS fires "pointerenter" with mouse pointerType in addition to touch|
|Product:||WebKit||Reporter:||Devon Govett <govett>|
|Component:||UI Events||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||graouts, thorton, webkit-bug-importer, wenson_hsieh|
Description Devon Govett 2020-07-21 11:55:19 PDT
When you have an element with a `tabIndex`, Safari on iOS fires the "pointer enter" and "pointerleave" events twice: once with `pointerType` set to "touch", and again with `pointerType` set to "mouse". After touching and releasing the element, the events fired are: * pointer enter: pointerType = "touch" * pointer leave: pointerType = "touch" * pointer enter: pointerType = "mouse" A pointer leave event with pointerType = "mouse" is not fired until the element is blurred (e.g. by tapping on something else that's focusable). Based on this information, it appears that focus/blur events are also causing pointer enter/pointer leave events. You can try this out in a demo here: https://codepen.io/devongovett/pen/QWyYWYa
Comment 2 Wenson Hsieh 2020-07-21 14:30:06 PDT
> * pointer enter: pointerType = "touch" > * pointer leave: pointerType = "touch" > * pointer enter: pointerType = "mouse" These seem like events that would be fired when dispatching synthetic click events, which should be fixed in the iOS 14 beta.