New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse: Recover after out of document mouseup #297

wants to merge 1 commit into
base: master


None yet
2 participants

bethge commented Jun 16, 2016

This PR should resolve #279 for Safari.

Since we have no way of detecting the release of a pressed mouse button that occurs outside of the document, we synchronize our internal buttons state (which is stored in the pointermap) with the buttons state during any mouse event (e.g. a mousemove).

Since Safari does not have a buttons property, we cannot synchronize the buttons state directly. Safari does tell us via the which property whether any button is actually pressed during a mousemove, -enter, -leave, -over and -out.
If the which property is equal to zero, no mouse buttons are currently pressed and the buttons property of the pointer event should be equal to zero.
While we would not be able to detect if a chorded button press has been partially released outside of the document, this should cover the more common case of releasing a single button press outside of the document.

@bethge bethge closed this in a9d1b71 Jul 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment