浏览代码

Make sure Keys are initialized on correct window, fixes issues where Key events would not work on newly opened tabs

trethaller 4 年之前
父节点
当前提交
ce76e32c70
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/comp/Scene.hx

+ 1 - 1
hide/comp/Scene.hx

@@ -128,9 +128,9 @@ class Scene extends Component implements h3d.IDrawable {
 			new Element(canvas).on("resize", function() {
 				@:privateAccess window.checkResize();
 			});
-			hxd.Key.initialize();
 			engine.setCurrent();
 			window.setCurrent();
+			hxd.Key.initialize();
 			s2d = new h2d.Scene();
 			if (chunkifyS3D) {
 				s3d = new hide.tools.ChunkedScene();