Open Bug 1504210 Opened 7 years ago Updated 2 years ago

PointerEvents for the left mouse button do not work correctly on MacOS when Control is pressed

Categories

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

63 Branch
defect

Tracking

()

Tracking Status
firefox63 --- affected
firefox64 --- affected
firefox65 --- affected

People

(Reporter: pdaehne, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file controlClickBug.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: Open the attached test file "controlClickBug.html" with Firefox on MacOS. Press&hold the control button and click the left mouse button when the mouse pointer is over the page. Actual results: I get "mousedown" printed on the web page when pressing the left mouse button, and "pointerup" followed by "mouseup" when releasing the left mouse button. Expected results: I expect to get "pointerdown" printed on the web page when pressing the left mouse button, and "pointerup" when releasing the left mouse button. I do not expect to get any mouse events.
User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0 Build ID: 20181106100114 I manage to reproduce this on Macbook 10.14 with Firefox Nightly 65.0a1 (2018-11-06).
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Product: Firefox → Core
Also able to reproduce in Nightly. Tim, any thoughts what might be causing this?
Flags: needinfo?(tihuang)
Priority: -- → P3
Sorry for my late response. My speculation is that holding the Control button changes the order of events. In other words, the mousedown event sends before the pointer down event in this case. But how? I am not really an expert of events, so I might be wrong here. Masayuki, do you happen to know the reason?
Flags: needinfo?(tihuang) → needinfo?(masayuki)
We'll need to have someone own this (pointer events). Working towards a plan.
Flags: needinfo?(masayuki)
Component: DOM: Events → DOM: UI Events & Focus Handling

We probably doesn't handle the mouse event with modifiers well.

For Control + left mouse button case, it seems there is a bug in https://searchfox.org/mozilla-central/rev/a4be2fbe9bd4f405c91cc16e4e3a80400f5a9301/dom/events/PointerEventHandler.cpp#512-517 which init a pointermove event instead.

Depends on: 1615732

(In reply to Edgar Chen [:edgar] (OOO from 2/19 to 3/6) from comment #7)

For Control + left mouse button case, it seems there is a bug in https://searchfox.org/mozilla-central/rev/a4be2fbe9bd4f405c91cc16e4e3a80400f5a9301/dom/events/PointerEventHandler.cpp#512-517 which init a pointermove event instead.

I too just noticed that, there always seems to be a pointermove event instead of the pointerdown. This issue is really important to us because our product is a datavis toolkit and so this breaks our right click interactions

Depends on: 1630962

This should be fix on Nightly now (bug 1615732), but we still need to fix bug 1630959 first before enabling it on all channel (bug 1630962).

Blocks: pointerevent
No longer blocks: 822898

I don't think this is fixed on Nightly. Control-click generates pointerdown→mousedown→contextmenu on Chrome 95 and Safari 14.1, but still only mousedown→contextmenu (i.e. it omits "pointerdown") on FF 95 and Nightly. [See https://jsfiddle.net/y8ot42pa/]

Setting “dom.event.treat_ctrl_click_as_right_click.disabled” to true does seem to fix the issue, but I'm not sure what the side effects are.

Using a 2012 MacBook Pro running Mojave 10.14.6.

Severity: normal → S3
Duplicate of this bug: 1837973
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: