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() }