瀏覽代碼

Editor: Improved UINumber and UIInteger behavior.

Mr.doob 1 年之前
父節點
當前提交
f9a97ef781
共有 1 個文件被更改,包括 4 次插入0 次删除
  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 ) {
 
+			if ( document.activeElement === scope.dom ) return;
+
 			event.preventDefault();
 
 			distance = 0;
@@ -821,6 +823,8 @@ class UIInteger extends UIElement {
 
 		function onMouseDown( event ) {
 
+			if ( document.activeElement === scope.dom ) return;
+
 			event.preventDefault();
 
 			distance = 0;