Open mantou132 opened 3 years ago
Chrome on Windows fires auxclick before contextmenu as Firefox does. Perhaps a platform dependent bug from Chrome?
On Linux, both Firefox and Chrome fire contextmenu
-> auxclick
.
On Windows and macOS, a native event notifies applications of context menu open. It seems that GTK on Linux does not have it.
And whether context menu should be opened at mousedown
or mouseup
depends on the platform manner. So, it might be difficult to consider the order.
https://searchfox.org/mozilla-central/rev/31ddf859c57e812878a5f817e4097efb06de4d97/modules/libpref/init/StaticPrefList.yaml#9965-9971
https://codepen.io/mantou132/pen/NWNGPJL
When the right mouse button is clicked, the
contextmenu
auxclick
event will be triggered.But the trigger sequence is inconsistent in chrome and Firefox:
// macOS Firefox:
auxclick
,contextmenu
Chrome:contextmenu
,auxclick