diff --git a/src/core/view/plugins/events.js b/src/core/view/plugins/events.js index 16656149cc5d6a8299b6949c9694879b698fe3c4..12314e01a6073b45f6977037b0433fa4f3a9273b 100644 --- a/src/core/view/plugins/events.js +++ b/src/core/view/plugins/events.js @@ -49,6 +49,10 @@ function processTouches (touches) { return [] } +function isPCEvent (name) { + return name.startsWith('mouse') || ['contextmenu'].includes(name) +} + export function processEvent (name, $event = {}, detail = {}, target = {}, currentTarget = {}) { if ($event._processed) { $event.type = detail.type || name @@ -90,7 +94,7 @@ export function processEvent (name, $event = {}, detail = {}, target = {}, curre stopPropagation () {} }) - if (name.startsWith('mouse')) { + if (isPCEvent(name)) { const { top } = getWindowOffset()