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(OrbitControls): make "wheel" listener passive #353

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

satelllte
Copy link
Contributor

@satelllte satelllte commented Mar 30, 2024

Why / What

Resolves: #352

Checklist

  • N/A Documentation updated
  • N/A Storybook entry added
  • Ready to be merged

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@satelllte satelllte marked this pull request as ready for review March 30, 2024 10:16
@satelllte satelllte changed the title wheel listener passive fix: make "wheel" listener passive Mar 30, 2024
scope.domElement.addEventListener('wheel', onMouseWheel)
scope.domElement.addEventListener('wheel', onMouseWheel, { passive: true })
Copy link
Member

Choose a reason for hiding this comment

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

I believe we need this parameter in dispose as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we should, since EventTarget.removeEventListener signature doesn't have passive prop in its options

@CodyJasonBennett CodyJasonBennett changed the title fix: make "wheel" listener passive fix(OrbitControls): make "wheel" listener passive Apr 27, 2024
@CodyJasonBennett CodyJasonBennett merged commit f357e50 into pmndrs:main Apr 30, 2024
3 checks passed
Copy link

🎉 This PR is included in version 2.29.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-passive event listener to a scroll-blocking 'wheel' event
2 participants