Fix image stuck to mouse when right-clicking and left-clicking simultaneously.

Mouseup and mousedown events are lost when two buttons are pressed at the same time. Pressing buttons in the order left-button down, right-button down (ignored), left-button up (ignored), right-button up was leaving drag state active.
This commit is contained in:
larissasmith 2017-06-16 14:05:35 -06:00
parent 265625df75
commit 319d27f0c0

View File

@ -2879,6 +2879,12 @@
}
}
// A primary mouse button may have been released while the non-primary button was down
if (pointsList.contacts > 0 && pointsList.type === 'mouse') {
// Stop tracking the mouse
pointsList.contacts--;
return true;
}
return false;
}