[w3c/uievents] > Overall, Firefox is the most consistent. Ctrl+click and 2-finger-click should act the same, but Chrome and Safari are not. Safari should send auxclick for non-primary mouse clicks. (Issue #334)

> Overall, Firefox is the most consistent. Ctrl+click and 2-finger-click should act the same, but Chrome and Safari are not. Safari should send auxclick for non-primary mouse clicks.

Note that after https://bugzilla.mozilla.org/show_bug.cgi?id=1615732 Firefox dispatches mousedown/mouseup with button=0 (instead of button=2) for Ctrl+click, so we would dispatch `click` event then instead. 2-finger trackpad click behaves the same (mousedown/mouseup with button=2 and `auxclick`).

I test with https://domeventviewer.com/mouse-event-viewer.html on Firefox Nightly again.

Firefox = Nightly 80.0a1 (2020-06-29) 

### Click ###
type | button | buttons | ctrlKey
------------- | ------------- | ------------- | -------------
`mousedown` | 0 | 1 | false
`mouseup` | 0 | 0 | false
`click` | - | 0 | false

### Ctrl+click ###
When the contextmenu handler calls preventDefault:
type | button | buttons | ctrlKey
------------- | ------------- | ------------- | -------------
`mousedown` | 0 | 1 | true
`contextmenu` | - | 1 | true
`mouseup` | 0 | 0 | true
`click` | - | 0 | true

### 2-finger trackpad click ###
When the contextmenu handler calls preventDefault:
type | button | buttons | ctrlKey
------------- | ------------- | ------------- | -------------
`mousedown` | 2 | 2 | false
`contextmenu` | - | 2 | false
`mouseup` | 2 | 0 | false
`auxclick` | - | 0 | false

_Originally posted by @EdgarChen in https://github.com/w3c/uievents/issues/265#issuecomment-652347442_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/334
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/334@github.com>

Received on Thursday, 4 August 2022 08:58:10 UTC