# Mobile devices and DragControls

**URL:** <https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461>\
**Category:** Questions\
**Tags:** drag-controls\
**Created:** [April 20, 2020, 10:52pm UTC](https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461 "2020-04-20T22:52:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![twanelEmporium](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/twanelemporium/32/6102_2.png) [@twanelEmporium](https://discourse.threejs.org/u/twanelEmporium)\
**Post date:** [April 20, 2020, 10:52pm UTC](https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461/1 "2020-04-20T22:52:04Z")

</div>

So, a while ago I had an issue with orbit controls where the touch events were conflicting, and I found the solution somewhere which told me to go into OrbitControls.js and comment out the function event.preventDefault(); under the onTouchStart function. That resolved that particular issue.

Now, I am having a similar problem with Drag Controls. My code works fine on the laptop, but when I run it on mobile, again the touch events seem to be conflicting. So I tried to do the same thing. In DragControls.js, under the onDocumentTouchStart function, I comment out the event.preventDefault(); however this time the problem was not resolved.

Was wondering if anyone else ran into this issue and has a solution for it.

---

<div class="post-metadata">

**Author:** ![twanelEmporium](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/twanelemporium/32/6102_2.png) [@twanelEmporium](https://discourse.threejs.org/u/twanelEmporium)\
**Post date:** [April 20, 2020, 11:29pm UTC](https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461/2 "2020-04-20T23:29:11Z")

</div>

I resolved the issue by commenting out the rest of the preventDefault() in the other touch functions

---

<div class="post-metadata">

**Author:** ![seanwasere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/seanwasere/32/20864_2.png) [@seanwasere](https://discourse.threejs.org/u/seanwasere)\
**Post date:** [April 21, 2020, 6:32am UTC](https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461/3 "2020-04-21T06:32:21Z")

</div>

Here is an example of using multiple controls at the same time.  
OrbitControls, DragControls and TransformControls in the same scene.  
[https://sbcode.net/extra\_html/multiplecontrols.html](https://sbcode.net/extra_html/multiplecontrols.html)  
You can view the source to see the code. No changes were made to the threejs libs.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [April 21, 2020, 9:02am UTC](https://discourse.threejs.org/t/mobile-devices-and-dragcontrols/14461/4 "2020-04-21T09:02:54Z")

</div>

/cc

> <https://stackoverflow.com/questions/61333309/drag-controls-for-touch-events>
