From fad099eee1246fdd04cdfde07a4f20e8a709e7e3 Mon Sep 17 00:00:00 2001 From: NoCrypt <57245077+NoCrypt@users.noreply.github.com> Date: Fri, 23 Aug 2024 06:13:56 +0700 Subject: [PATCH] feat: exit full screen gracefully when popstate --- common/App.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/App.svelte b/common/App.svelte index 0d309ef..5cf3d78 100644 --- a/common/App.svelte +++ b/common/App.svelte @@ -36,6 +36,10 @@ if (!state) return ignoreNext = true view.set(null) + if (document.fullscreenElement) { + document.exitFullscreen(); + if (state.type === 'view') page.set('home') + } if (state.type === 'page') { page.set(state.value) } else {