瀏覽代碼

MonacoEditor: focus stolen by scene when dragging mouse on it, so ctrl C won't copy monaco's selected text but prefab instead

lviguier 2 月之前
父節點
當前提交
31eab49fdc
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      hide/comp/Scene.hx

+ 2 - 3
hide/comp/Scene.hx

@@ -38,11 +38,10 @@ class Scene extends hide.comp.Component implements h3d.IDrawable {
 		this.config = config;
 		this.config = config;
 		element.addClass("hide-scene-container");
 		element.addClass("hide-scene-container");
 		canvas = cast new Element("<canvas class='hide-scene' style='width:100%;height:100%'/>").appendTo(element)[0];
 		canvas = cast new Element("<canvas class='hide-scene' style='width:100%;height:100%'/>").appendTo(element)[0];
-
 		canvas.addEventListener("mousemove",function(_) {
 		canvas.addEventListener("mousemove",function(_) {
 			switch(js.Browser.document.activeElement?.tagName) {
 			switch(js.Browser.document.activeElement?.tagName) {
-				// Don't steal focus if we are curently editing an <input>
-				case "INPUT":
+				// Don't steal focus if we are curently editing an input
+				case "INPUT", "TEXTAREA":
 					return;
 					return;
 				default:
 				default:
 					canvas.focus();
 					canvas.focus();