# OrbitControls double-click breaks with multiple scenes

**URL:** <https://discourse.threejs.org/t/orbitcontrols-double-click-breaks-with-multiple-scenes/54229>\
**Category:** Questions\
**Tags:** orbit-controls\
**Created:** [July 24, 2023, 8:32am UTC](https://discourse.threejs.org/t/orbitcontrols-double-click-breaks-with-multiple-scenes/54229 "2023-07-24T08:32:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![stickske](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/stickske/32/17859_2.png) [@stickske](https://discourse.threejs.org/u/stickske)\
**Post date:** [April 1, 2024, 3:28pm UTC](https://discourse.threejs.org/t/orbitcontrols-double-click-breaks-with-multiple-scenes/54229/6 "2024-04-01T15:28:59Z")

</div>

I noticed the same behaviour and fixed it by preventing the double click event for my whole application.

Only apply on the Three js canvas

```javascript
// Assuming `renderer` is your Three.js WebGLRenderer
const canvas = renderer.domElement;

// Prevent default double click behavior on the canvas
canvas.addEventListener('dblclick', event => {
    event.preventDefault();
}, false);

```

Or apply on the entire page

```javascript
//Disable default double-click behavior on the entire document
document.addEventListener('dblclick', event => {
    event.preventDefault();
    event.stopPropagation(); // Stop the event from reaching other elements
}, false);

```

If the problem persist you can disable selection for the page as follow in CSS:  
You can allow selection on certain parts by adding the class selectable to your HTML tags  
or allow it on a whole set. Like all .h1 for example, …

```javascript
/* Disable text selection for all elements */
* {
  user-select: none;
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer */
  -webkit-user-select: none; /* Chrome, Safari, Opera */
}

/* Allow text selection for elements with class "selectable" */
.selectable {
  user-select: auto;
}

```

---

_[View the full topic](https://discourse.threejs.org/t/orbitcontrols-double-click-breaks-with-multiple-scenes/54229)._
