From e75e9bf1296e25d030debd8f648a0437e5853eaf Mon Sep 17 00:00:00 2001 From: Mat Sz Date: Mon, 23 Oct 2023 18:51:08 +0200 Subject: [PATCH] resolve issues with scroll on mobile Chrome --- web/src/App.scss | 4 +--- web/src/index.tsx | 2 +- web/src/screens/Home.module.scss | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/App.scss b/web/src/App.scss index 1c786bc..5deee88 100644 --- a/web/src/App.scss +++ b/web/src/App.scss @@ -53,9 +53,7 @@ body { overflow: hidden; position: fixed; - left: 0; - right: 0; - bottom: 0; + inset: 0; height: 100%; touch-action: none; } diff --git a/web/src/index.tsx b/web/src/index.tsx index 36daa00..d45baf2 100644 --- a/web/src/index.tsx +++ b/web/src/index.tsx @@ -22,7 +22,7 @@ document.addEventListener( 'touchmove', (event: any) => { event = event.originalEvent || event; - if (event.scale !== 1) { + if (typeof event.scale !== 'undefined' && event.scale !== 1) { event.preventDefault(); } }, diff --git a/web/src/screens/Home.module.scss b/web/src/screens/Home.module.scss index ad67d6a..93a9866 100644 --- a/web/src/screens/Home.module.scss +++ b/web/src/screens/Home.module.scss @@ -1,5 +1,7 @@ .home { - margin: 15px; + margin-block-start: 15px; + padding: 15px; + padding-block-start: 0; overflow: auto; } @@ -7,7 +9,7 @@ margin: 15px; div > div { - margin-top: 1rem; + margin-block-start: 1rem; } span {