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).
<rdar://problem/120429508>
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.
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.
Pull request: https://github.com/WebKit/WebKit/pull/22988
Committed 273263@main (29875ec3a594): <https://commits.webkit.org/273263@main> Reviewed commits have been landed. Closing PR #22988 and removing active labels.
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/44124