Closed Bug 1902949 Opened 1 year ago Closed 10 months ago

Event.buttons by contextmenu is different of Chrome when using long tap

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(1 file)

From Bug 1879701.

When contextmenu event is fired by long tap (GeckoView or Windows Tablet), event.buttons is always 2. But this is 0 on Chrome. Which is correct? I think that Chrome is correct since this isn't by mouse.

APZ caller sets button is 2 at force, also WidgetMouseEvent's ContextMenuTrigger doesn't have long tap type.

Component: DOM: Editor → DOM: Events

(Safari/iOS doesn't support contextmenu by long tap..)

Hmm, .buttons indicates the physical state of the device.
https://w3c.github.io/pointerevents/#button-states

It seems that both Firefox and Chrome are wrong. 1 is correct in the case unless Pointer Events spec does not assume the case.

Yeah, 2 sounds wrong, that's for pen.

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/b84884a9274d button and buttons property of contextmenu should be touch contact. r=masayuki
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: