We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56d49d4 commit dd1f988Copy full SHA for dd1f988
src/MouseBackend.js
@@ -20,6 +20,15 @@ function getNodeClientOffset (node) {
20
return { x: left, y: top }
21
}
22
23
+function isRightClick (e) {
24
+ if ('which' in e) {
25
+ return e.which === 3
26
+ } else if ('button' in e) {
27
+ return e.button === 2
28
+ }
29
+ return false
30
+}
31
+
32
export default class MouseBackend {
33
constructor(manager) {
34
this.actions = manager.getActions()
@@ -138,7 +147,7 @@ export default class MouseBackend {
138
147
139
148
handleMoveStart (sourceId, e) {
140
149
// Ignore right mouse button.
141
- if (e.which === 3) return
150
+ if (isRightClick(e)) return
142
151
this.moveStartSourceIds.unshift(sourceId)
143
152
144
153
0 commit comments