`mousedown` events for Control + left-mouse-button report different `button` value than other browsers on Mac
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Steps to reproduce:
Open https://jsfiddle.net/7d4r61p8/1/, press and hold the control button and click the left mouse button.
Actual results:
Firefox shows mousedown, button=2, buttons=1, ctrlKey=true
.
Expected results:
All other browsers (Safari, Chrome, Edge) show mousedown, button=0, buttons=1, ctrlKey=true
.
Assignee | ||
Comment 1•4 years ago
|
||
It is because of https://searchfox.org/mozilla-central/rev/174f1195ec740e8f17223b48018f7e14e6d4e40e/widget/cocoa/nsChildView.mm#3175-3178 where was added in bug 362812.
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Try result looks good, however, we need to modify the front end code, given that it only checks button
to decide whether we should show popup or context-menu, see https://searchfox.org/mozilla-central/rev/cc0f9906505d0ffa0d3a29a80142379e21cb5fb2/browser/components/customizableui/content/panelUI.js#383.
Assignee | ||
Comment 5•4 years ago
|
||
On Mac, ctrl-click will send a context menu event from the widget, so we don't
want to bring up the panel when ctrl key is pressed.
Assignee | ||
Comment 6•4 years ago
|
||
On Mac, ctrl-click will send a context menu event from the widget, so we don't
want to bring up the panel when ctrl key is pressed.
Assignee | ||
Comment 7•4 years ago
|
||
On Mac, ctrl-click will send a context menu event from the widget, so we don't
want to bring up the panel when ctrl key is pressed.
Assignee | ||
Comment 8•4 years ago
|
||
On Mac, ctrl-click will send a context menu event from the widget, so we don't
want to bring up the panel when ctrl key is pressed.
Assignee | ||
Comment 9•4 years ago
•
|
||
Assignee | ||
Comment 10•4 years ago
|
||
Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 12•4 years ago
|
||
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa861e50f198 Don't treat control-left-click on mac as a right-click; r=masayuki https://hg.mozilla.org/integration/autoland/rev/fcd441a2a860 Don't show page action panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/f648cf0653a7 Don't show menu panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/d7c5824d4579 Don't show download panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/bbcb173e6c44 Don't show menu on Mac when ctrl key is pressed; r=NeilDeakin https://hg.mozilla.org/integration/autoland/rev/297d82b338dc Don't handle click event on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/031b8abf43a8 Don't dispatch xul command event on Mac if it is from mouse event with ctrl key is pressed; r=Gijs,NeilDeakin
Comment 14•4 years ago
|
||
Backed out for bc failures on browser_ext_pageAction_click_types.js.
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=296488201&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/0f304cbe484384efcebe5451887fc88ff6e7386a
task 2020-04-06T20:33:55.236Z] 20:33:55 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | No unnecessary modifiers for exactly one key on event -
[task 2020-04-06T20:33:55.236Z] 20:33:55 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | Correct modifier on click event -
[task 2020-04-06T20:33:55.236Z] 20:33:55 INFO - Buffered messages finished
[task 2020-04-06T20:33:55.236Z] 20:33:55 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | Test timed out -
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | no tasks awaiting on messages - Got ["onClick"], expected []
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - Stack trace:
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:test_is:1320
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:36
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:nextTest:570
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1183
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1130
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:925
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | Extension left running at test shutdown -
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - Stack trace:
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:test_ok:1292
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:117
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:nextTest:570
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1183
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1130
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:925
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - GECKO(1650) | MEMORY STAT | vsize 8179MB | residentFast 702MB | heapAllocated 218MB
[task 2020-04-06T20:33:55.242Z] 20:33:55 INFO - TEST-OK | browser/components/extensions/test/browser/browser_ext_pageAction_click_types.js | took 90109ms
Assignee | ||
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/73a09ded8610 Don't treat control-left-click on mac as a right-click; r=masayuki https://hg.mozilla.org/integration/autoland/rev/0927b858db99 Don't show page action panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/1110754652d1 Don't show menu panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/b122d93502a9 Don't show download panel on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/6921c42c9682 Don't show menu on Mac when ctrl key is pressed; r=NeilDeakin https://hg.mozilla.org/integration/autoland/rev/69785d2dfbf2 Don't handle click event on Mac when ctrl key is pressed; r=Gijs https://hg.mozilla.org/integration/autoland/rev/d8726d18021e Don't dispatch xul command event on Mac if it is from mouse event with ctrl key is pressed; r=Gijs,NeilDeakin
Comment 17•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/73a09ded8610
https://hg.mozilla.org/mozilla-central/rev/0927b858db99
https://hg.mozilla.org/mozilla-central/rev/1110754652d1
https://hg.mozilla.org/mozilla-central/rev/b122d93502a9
https://hg.mozilla.org/mozilla-central/rev/6921c42c9682
https://hg.mozilla.org/mozilla-central/rev/69785d2dfbf2
https://hg.mozilla.org/mozilla-central/rev/d8726d18021e
Description
•