Bug 210054 - Unable to distinguish compatibility mouse events from real mouse events
Summary: Unable to distinguish compatibility mouse events from real mouse events
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-06 09:45 PDT by Ashley Gullen
Modified: 2024-02-01 04:45 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley Gullen 2020-04-06 09:45:38 PDT
As of iPadOS 13.4, you can connect a bluetooth mouse to an iPad and use real mouse input in a web page.

Unfortunately touch events (and IIRC pointer events) can still fire compatibility mouse events after touch input. It is now fiendishly difficult to tell apart compatibility mouse events from real mouse input. This can result in bugs where buttons or elements get double-pressed, because it receives both a touch event and mouse event.

Using pointer events consistently everywhere is a good idea, but for large web apps with ~500k lines of code all depending on touch events, overhauling all this code for a different input API is a major project. Further this would cause us to drop support for iOS 12 and older, which Apple's official stats still show is a large number of devices, especially including all devices (not just ones from the past 4 years). Previously we just ignored all mouse events on iOS, but now we can't do that, because it blocks using a bluetooth mouse.

Chrome on Android has long supported Input Device Capabilities, so you can easily identify compatibility mouse events with e.sourceCapabilities.firesTouchEvents (indicating a mouse event that was fired from a touchscreen device). Please consider adding this to Safari. It makes it trivial to ignore compatibility mouse events in large complex webapps that are difficult to port to Pointer Events.
Comment 1 Radar WebKit Bug Importer 2020-04-07 11:43:14 PDT
<rdar://problem/61402880>