Explorar o código

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

trethaller %!s(int64=4) %!d(string=hai) anos
pai
achega
ce76e32c70
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();