Skip to content
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

Fix drag handler corner cases #6193

Merged
merged 3 commits into from
Feb 20, 2018
Merged

Fix drag handler corner cases #6193

merged 3 commits into from
Feb 20, 2018

Conversation

jfirebaugh
Copy link
Contributor

@jfirebaugh jfirebaugh commented Feb 20, 2018

@jfirebaugh jfirebaugh changed the title Ensure drag gesture ends even if the control key is down on mouseup Fix drag handler corner cases Feb 20, 2018
window.document.addEventListener('touchmove', this._onMove);
window.document.addEventListener('touchend', this._onUp);
} else {
if (e.ctrlKey || e.button !== 0) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is e.button guaranteed to be defined in this case? (Asking because in _ignoreEvent, we checked e.button && e.button !== 0.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mousedown will always have e.button defined. I think it was guarded before because _ignoreEvent was also used for mousemove.

@jfirebaugh jfirebaugh merged commit 12f5430 into master Feb 20, 2018
@jfirebaugh jfirebaugh deleted the fix-6192 branch February 20, 2018 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Left-button mouse click shouldn't end right-button drag rotate Stuck in drag mode
2 participants