Closed Bug 1640139 Opened 5 years ago Closed 5 years ago

`contextmenu` events triggered from Control + left-mouse-button report different `button` value than other browsers on Mac

Categories

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

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: edgar, Assigned: edgar)

Details

Attachments

(1 file)

+++ This bug was initially created as a follow-up of Bug #1638872 comment #9 +++

This is a similar issue as bug 1615732.
In Mac, control + mouse-left-click will trigger contextmenu event, so do other browsers. But we dispatch contextmenu event with different a button value with other browsers.

STR

  1. Load https://codepen.io/edgarchen-the-decoder/pen/ExVGRxB
  2. control + mouse-left-click on green area.
  3. Check the log for contextmenu event

Actual Result

Got contextmenu, button:2, buttons:1, ctrlKey:true
where all other browsers (Chrome, Safari, Edge, Opera) is contextmenu, button:0, buttons:1, ctrlKey:true

Expected Result

Should align with other browsers.

All other browsers dispatch contextmenu as left-button in this case.

Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a2c008495f22 Don't dispatch contextmenu event triggered from control-left-click as right-button in Mac; r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: