diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 67e09f6..b4891db 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -1118,11 +1118,11 @@ { if (isRightButton) { - trackingData.rightDown = hit; + trackingData.rightDown = false; } else { - trackingData.leftDown = hit; + trackingData.leftDown = false; } } } diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 67e09f6..b4891db 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -1118,11 +1118,11 @@ { if (isRightButton) { - trackingData.rightDown = hit; + trackingData.rightDown = false; } else { - trackingData.leftDown = hit; + trackingData.leftDown = false; } } } diff --git a/test/interaction/InteractionManager.js b/test/interaction/InteractionManager.js index dc70ab5..2a04bc5 100644 --- a/test/interaction/InteractionManager.js +++ b/test/interaction/InteractionManager.js @@ -342,7 +342,12 @@ pointer.mouseup(10, 10); - expect(clickSpy).to.not.have.been.called; + expect(clickSpy, 'click should not happen on first mouseup').to.not.have.been.called; + + // test again, just because it was a bug that was reported + pointer.mouseup(20, 20); + + expect(clickSpy, 'click should not happen on second mouseup').to.not.have.been.called; }); });