From c30644b9a97d70fe1b5ccc1a2dab43d83f239451 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 17 Oct 2023 23:30:03 +0300 Subject: [PATCH] fix(regression): escape should work in fullscreen (lock) --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index af8a9887b..57e6930f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -728,6 +728,7 @@ window.addEventListener('keydown', (e) => { } }) } else if (pointerLock.hasPointerLock) { + document.exitPointerLock?.() if (options.autoExitFullscreen) { void document.exitFullscreen() }