|
@@ -673,8 +673,15 @@ THREE.OrbitControls = function ( object, domElement ) {
|
|
|
|
|
|
if ( scope.enabled === false ) return;
|
|
if ( scope.enabled === false ) return;
|
|
|
|
|
|
|
|
+ // Prevent the browser from scrolling.
|
|
|
|
+
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
+ // Manually set the focus since calling preventDefault above
|
|
|
|
+ // prevents the browser from setting it automatically.
|
|
|
|
+
|
|
|
|
+ scope.domElement.focus ? scope.domElement.focus() : window.focus();
|
|
|
|
+
|
|
switch ( event.button ) {
|
|
switch ( event.button ) {
|
|
|
|
|
|
case scope.mouseButtons.LEFT:
|
|
case scope.mouseButtons.LEFT:
|