Touch events and stop propagation #1219
Unanswered
carmandale
asked this question in
Q&A
Replies: 2 comments
-
If I turn off OrbitControls, onClick works as expected on mobile. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There seems to be a conflict with onClick and OrbitControls. So I have to use onPointerDown to use touch events on mobile. My only problem with this is that the touch event is going through the element and triggering touch events on other objects too. This doesn't happen on desktop with mouse. Even when I stop propagation, the event "travels through" to the other objects.
onPointerDown={(e) => { e.stopPropagation(); handleT(); }}
any thoughts or ideas or known fixes?
Beta Was this translation helpful? Give feedback.
All reactions