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

OrbitControls: handle duplicated pointerId #27748

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

sciecode
Copy link
Contributor

Fixes #27746

Reported issue occurs when clicking both left/right mouse buttons and dragging mouse outside DOM area. This underlying issue is that both actions use the same pointerId, which in turn, duplicates their reference internally leading to incorrect handling of later actions.

Issue is resolved by only keeping track of new clicks, if their pointerId is unique and currently not tracked.

PR Example

The problem reported in #24566, still occurs. However, it does appear like it is a browser-side issue. As it stems from events not firing under specific situations and not something we can easily manage internally, without simply removing any currently tracked events when pointer goes outside DOM.

@sciecode
Copy link
Contributor Author

sciecode commented Feb 14, 2024

@wnr if possible, please validate.

@Mugen87 Mugen87 added this to the r162 milestone Feb 14, 2024
@wnr
Copy link

wnr commented Feb 14, 2024

@sciecode Yes that fixes my issue, well done! 💯

@Mugen87 Mugen87 merged commit 8efe8f8 into mrdoob:dev Feb 14, 2024
11 checks passed
@sciecode sciecode deleted the dev-orbit-mouse branch February 14, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants