Bug 1879701 Comment 20 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Actually, no way to detect whether contextmenu is by mouse or touch (long tap) since `event.buttons` value is same value (although Chrome is different). If C++ code, we will be able to get event source type.  [APZ caller](https://searchfox.org/mozilla-central/rev/4c8627a76e2e0a9b49c2b673424da478e08715ad/gfx/layers/apz/util/APZEventState.cpp#171-175) sets button is 2, and `WidgetMouseEvent`'s `ContextMenuTrigger` doesn't have long tap type. (If C++ code, we can get event source type.).

But dom side will change event type for contextmenu by Bug 1675847, so after it, we can detect whether touch or mouse for contextmenu.
Actually, no way to detect whether contextmenu is by mouse or touch (long tap) since `event.buttons` value is same value (although Chrome is different). If C++ code, we will be able to get event source type.  [APZ caller](https://searchfox.org/mozilla-central/rev/4c8627a76e2e0a9b49c2b673424da478e08715ad/gfx/layers/apz/util/APZEventState.cpp#171-175) sets button is 2, and `WidgetMouseEvent`'s `ContextMenuTrigger` doesn't have long tap type.

But dom side will change event type for contextmenu by Bug 1675847, so after it, we can detect whether touch or mouse for contextmenu.

Back to Bug 1879701 Comment 20