Explorar o código

Editor: Improved UINumber and UIInteger behavior.

Mr.doob %!s(int64=2) %!d(string=hai) anos
pai
achega
f9a97ef781
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      editor/js/libs/ui.js

+ 4 - 0
editor/js/libs/ui.js

@@ -553,6 +553,8 @@ class UINumber extends UIElement {
 
 
 		function onMouseDown( event ) {
 		function onMouseDown( event ) {
 
 
+			if ( document.activeElement === scope.dom ) return;
+
 			event.preventDefault();
 			event.preventDefault();
 
 
 			distance = 0;
 			distance = 0;
@@ -821,6 +823,8 @@ class UIInteger extends UIElement {
 
 
 		function onMouseDown( event ) {
 		function onMouseDown( event ) {
 
 
+			if ( document.activeElement === scope.dom ) return;
+
 			event.preventDefault();
 			event.preventDefault();
 
 
 			distance = 0;
 			distance = 0;

粤ICP备19079148号