-
Notifications
You must be signed in to change notification settings - Fork 732
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
TrackballControls prevents click events #171
Comments
I was able to solve this problem by importing |
Still having this issue. |
Hi @Marviel, If you can provide a minimal working example of the issue, I'd be happy to open this again and we can look into it. |
orbit does that, too. they swallow "onClick" on mobile for instance. the reason for this is probably not related to drei or r3f, it's something three does most likely and in that case we couldn't fix it anyway, but would be nice to know what it is. maybe related to this bit: function onMouseDown( event ) {
event.preventDefault();
event.stopPropagation(); https://github.com/mrdoob/three.js/blob/dev/examples/jsm/controls/TrackballControls.js edit:* so it probably shuts down the event and it travels no longer. i don't quite understand why they have to call stopPropagation tbh. the current workaround is to use onPointerUp instead, not even sure why it works, but it seems to be ok. it has some disadvantages, though. it is not 100% the same as a click. |
I found that adding
TrackballControls
to the scene prevents click events from happening.Here is a reproduction: https://codesandbox.io/s/pedantic-kilby-l4ggk
The text was updated successfully, but these errors were encountered: