Fix applying "disableAbsoluteMouse" patch in the wrong place

This commit is contained in:
redphx
2024-12-08 07:08:15 +07:00
parent da362325f2
commit 3864457a07
4 changed files with 11 additions and 8 deletions

View File

@@ -195,6 +195,8 @@ export class NativeMkbHandler extends MkbHandler {
destroy(): void {
this.pointerClient?.stop();
this.stop();
window.removeEventListener('keyup', this);
window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this);
@@ -203,6 +205,7 @@ export class NativeMkbHandler extends MkbHandler {
window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this);
this.waitForMouseData(false);
document.pointerLockElement && document.exitPointerLock();
}
handleMouseMove(data: MkbMouseMove): void {