Skip to content

Commit 8c642d4

Browse files
committed
chore: remove event.preventDefault from orbitControls mouse handlers
as per mrdoob/three.js#21935
1 parent 2a72eb9 commit 8c642d4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/controls/OrbitControls.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -715,14 +715,6 @@ class OrbitControls extends EventDispatcher {
715715
}
716716

717717
function onMouseDown(event: MouseEvent) {
718-
// Prevent the browser from scrolling.
719-
event.preventDefault()
720-
721-
// Manually set the focus since calling preventDefault above
722-
// prevents the browser from setting it automatically.
723-
724-
scope.domElement?.focus ? scope.domElement.focus() : window.focus()
725-
726718
let mouseAction
727719

728720
switch (event.button) {
@@ -787,8 +779,6 @@ class OrbitControls extends EventDispatcher {
787779
function onMouseMove(event: MouseEvent) {
788780
if (scope.enabled === false) return
789781

790-
event.preventDefault()
791-
792782
switch (state) {
793783
case STATE.ROTATE:
794784
if (scope.enableRotate === false) return

0 commit comments

Comments
 (0)