Bug 267008 - REGRESSION(268459@main): PointerEvent pointerup `button` value does not match pointerdown
Summary: REGRESSION(268459@main): PointerEvent pointerup `button` value does not match...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Abrar Rahman Protyasha
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-01-02 16:06 PST by Simon Sarris
Modified: 2024-01-22 11:25 PST (History)
2 users (show)

See Also:


Attachments
Reproducible example (685 bytes, text/html)
2024-01-02 16:06 PST, Simon Sarris
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Sarris 2024-01-02 16:06:21 PST
Created attachment 469266 [details]
Reproducible example

This is a regression. All browsers (and Safari used to) match PointerEvent.button for corresponding pointerdown and pointerup events.

This means that a right click will be button = 2 for the pointerdown, but button = 0 for pointerup. This will break JavaScript that expects to do right-click events on pointerup.

A very basic reproducible example is attached. Allegedly this worked correctly in Safari 16.5 (I have not tested) but now fails in 17.2.1 (I have tested).
Comment 1 Radar WebKit Bug Importer 2024-01-03 11:03:36 PST
<rdar://problem/120429508>
Comment 2 Abrar Rahman Protyasha 2024-01-03 12:32:59 PST
Thanks for the bug report -- I suspect this is related to the changes introduced for webkit.org/b/262109 or webkit.org/b/262089 (or both). Investigating.
Comment 3 Abrar Rahman Protyasha 2024-01-18 13:37:20 PST
Works: 268458@main
Fails: 268459@main

So, the regression point is 268459@main, which makes sense given the nature of the change. It looks like some state in PointerCaptureController is broken, which I will investigate shortly.
Comment 4 Abrar Rahman Protyasha 2024-01-19 12:15:08 PST
Pull request: https://github.com/WebKit/WebKit/pull/22988
Comment 5 EWS 2024-01-20 05:18:39 PST
Committed 273263@main (29875ec3a594): <https://commits.webkit.org/273263@main>

Reviewed commits have been landed. Closing PR #22988 and removing active labels.
Comment 6 Abrar Rahman Protyasha 2024-01-22 11:25:18 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/44124