WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311544
[WPE][GTK] preventDefault() on pointerdown does not suppress gesture-based compatibility mouse events from touch
https://bugs.webkit.org/show_bug.cgi?id=311544
Summary
[WPE][GTK] preventDefault() on pointerdown does not suppress gesture-based co...
klee
Reported
2026-04-05 19:04:54 PDT
On WPE (and likely GTK), calling preventDefault() on a pointerdown event does not suppress compatibility mouse events generated from touch input. After every touch tap, mouse emulation events (pointerId=1, pointerType=mouse) are fired at the same coordinates regardless of whether pointerdown was cancelled. Per the W3C Pointer Events spec (
https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-events
): "Authors can prevent the production of certain compatibility mouse events by canceling the pointerdown event." "Mouse events can only be prevented when the pointer is down. Hovering pointers (e.g. a mouse with no buttons pressed) cannot have their mouse events prevented." - Test case: document.documentElement.addEventListener("pointerdown", (e) => { e.preventDefault(); }, true); - How to reproduce: 1. Create a page with a pointerdown handler that calls e.preventDefault() 2. Load it in WPE browser with touch input 3. Tap the screen - Expected Result: - pointerdown (touch) fires, app calls preventDefault() - No compatibility mouse events should follow - Actual Result: - pointerdown (touch) fires, app calls preventDefault() - pointermove/pointerover with pointerId=1, pointerType=***mouse*** fires ~1ms later
Attachments
Add attachment
proposed patch, testcase, etc.
klee
Comment 1
2026-04-05 19:12:04 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62097
EWS
Comment 2
2026-04-08 23:31:04 PDT
Committed
310827@main
(45f6219e113d): <
https://commits.webkit.org/310827@main
> Reviewed commits have been landed. Closing PR #62097 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug