From c008140983a6414699450d23b7d1b1ecabe187e5 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Mon, 17 Oct 2022 07:59:02 +0300 Subject: [PATCH] Disabled touch when Pop-up is open (#2308) Signed-off-by: Alexander Platov --- packages/ui/src/components/PanelInstance.svelte | 1 + packages/ui/src/components/PopupInstance.svelte | 1 + packages/ui/src/components/internal/Root.svelte | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/PanelInstance.svelte b/packages/ui/src/components/PanelInstance.svelte index 1a8b57b718..b5d15755e4 100644 --- a/packages/ui/src/components/PanelInstance.svelte +++ b/packages/ui/src/components/PanelInstance.svelte @@ -181,6 +181,7 @@ left: 0; width: 100%; height: 100%; + touch-action: none; &.show { background: rgba(0, 0, 0, 0.5); diff --git a/packages/ui/src/components/PopupInstance.svelte b/packages/ui/src/components/PopupInstance.svelte index edbfb5a717..42c17c1160 100644 --- a/packages/ui/src/components/PopupInstance.svelte +++ b/packages/ui/src/components/PopupInstance.svelte @@ -162,5 +162,6 @@ width: 100%; height: 100vh; transition: background-color 0.5s ease; + touch-action: none; } diff --git a/packages/ui/src/components/internal/Root.svelte b/packages/ui/src/components/internal/Root.svelte index b6ec2e1d77..1c7964a852 100644 --- a/packages/ui/src/components/internal/Root.svelte +++ b/packages/ui/src/components/internal/Root.svelte @@ -101,7 +101,10 @@ class="flex-center widget mr-3" class:on={isMobile} class:always={alwaysMobile} - on:click={() => (alwaysMobile = !alwaysMobile)} + on:click={() => { + alwaysMobile = !alwaysMobile + document.documentElement.style.setProperty('--app-height', `${window.innerHeight}px`) + }} >