Closed Bug 1837973 Opened 11 months ago Closed 11 months ago

`mousedown` button events for Control + left-mouse-button is not aligned with buttons property on Mac

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 114
defect

Tracking

()

RESOLVED DUPLICATE of bug 1504210

People

(Reporter: fabian.schwarzkopf, Unassigned)

Details

Steps to reproduce:

Similar as reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1615732 and https://bugzilla.mozilla.org/show_bug.cgi?id=1640139. Both are resolved, but the issue is still there.

Reproduce:
Open https://jsfiddle.net/7d4r61p8/1/, press and hold the control button and click the left mouse button.

Actual results:

Firefox shows mousedown, evt.button=2, evt.buttons=1, ctrlKey=true.

Expected results:

All other browsers (Safari, Chrome, Edge) show mousedown, evt.button=0, evt.buttons=1, ctrlKey=true.

Note how the mousedown with ctrl event in Firefox reports "evt.button" === secondary and "evt.buttons" === primary.
So basically a down event whose properties do not line up with each other in the same event.
Ideally, it should resemble the same evt.button and evt.buttons state as the other browsers (i.e. primary for both properties).

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Analog for mouseup, it should report "evt.button" === primary then

The fix is only enabled on Nightly so far, you can flip dom.event.treat_ctrl_click_as_right_click.disabled to enable it on release as workaround.

Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Duplicate of bug: 1504210
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.