From 9d15f934b0629e6007e37d55ca94cfc6dbd75583 Mon Sep 17 00:00:00 2001 From: LabyStudio Date: Thu, 3 Feb 2022 16:15:17 +0100 Subject: [PATCH] improve request focus --- src/js/net/minecraft/client/GameWindow.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/net/minecraft/client/GameWindow.js b/src/js/net/minecraft/client/GameWindow.js index 1af33a3..9d0a202 100644 --- a/src/js/net/minecraft/client/GameWindow.js +++ b/src/js/net/minecraft/client/GameWindow.js @@ -131,6 +131,10 @@ window.GameWindow = class { this.mouseX = event.clientX; this.mouseY = event.clientY; + + if (!this.mouseLocked && this.minecraft.currentScreen === null) { + this.requestFocus(); + } } } \ No newline at end of file