From f345df80d60dc6e34d0b81a8ade386f7e2f538ab Mon Sep 17 00:00:00 2001 From: Joe Sullivan Date: Sat, 29 Oct 2016 10:52:30 -0400 Subject: [PATCH] Grab target and pointer above right-click logic (#3381) --- src/mixins/canvas_events.mixin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mixins/canvas_events.mixin.js b/src/mixins/canvas_events.mixin.js index 676e301d646..f5cfea08916 100644 --- a/src/mixins/canvas_events.mixin.js +++ b/src/mixins/canvas_events.mixin.js @@ -438,6 +438,9 @@ */ __onMouseDown: function (e) { + var target = this.findTarget(e), + pointer = this.getPointer(e, true); + // if right click just fire events var isRightClick = 'which' in e ? e.which === 3 : e.button === 2; if (isRightClick) { @@ -457,9 +460,6 @@ return; } - var target = this.findTarget(e), - pointer = this.getPointer(e, true); - // save pointer for check in __onMouseUp event this._previousPointer = pointer;