From c0923739b2d79dab89b28b6827f78e1af78915d6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 20 Dec 2021 17:18:44 +0100 Subject: [PATCH] Missing re-enable of body scrolling when the page is not scrolled --- ts/WoltLabSuite/Core/Ui/Mobile.ts | 9 ++++++--- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js | 8 +++++--- wcfsetup/install/files/style/layout/pageHeader.scss | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/Mobile.ts b/ts/WoltLabSuite/Core/Ui/Mobile.ts index 2f98c216ea..e724db555e 100644 --- a/ts/WoltLabSuite/Core/Ui/Mobile.ts +++ b/ts/WoltLabSuite/Core/Ui/Mobile.ts @@ -114,10 +114,13 @@ function closeSearch(searchBar: HTMLElement, scrollTop: number | null): void { searchBar.classList.remove("open"); } - if (Environment.platform() === "ios" && scrollTop) { + if (Environment.platform() === "ios") { UiScreen.scrollEnable(); - document.body.scrollTop = scrollTop; - scrollTop = null; + + if (scrollTop !== null) { + document.body.scrollTop = scrollTop; + scrollTop = null; + } } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js index 87a5b344e3..93f919496c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js @@ -94,10 +94,12 @@ define(["require", "exports", "tslib", "../Core", "../Dom/Change/Listener", "../ if (searchBar) { searchBar.classList.remove("open"); } - if (Environment.platform() === "ios" && scrollTop) { + if (Environment.platform() === "ios") { UiScreen.scrollEnable(); - document.body.scrollTop = scrollTop; - scrollTop = null; + if (scrollTop !== null) { + document.body.scrollTop = scrollTop; + scrollTop = null; + } } } function initButtonGroupNavigation() { diff --git a/wcfsetup/install/files/style/layout/pageHeader.scss b/wcfsetup/install/files/style/layout/pageHeader.scss index e4ee20eec7..1b78d63940 100644 --- a/wcfsetup/install/files/style/layout/pageHeader.scss +++ b/wcfsetup/install/files/style/layout/pageHeader.scss @@ -569,10 +569,12 @@ background-color: rgba(0, 0, 0, 0.34); bottom: 0; left: 0 !important; + overflow: hidden; right: 0 !important; .pageHeaderSearchInputContainer { border-radius: 0; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.19), 0 0 6px rgb(0, 0, 0, 0.23); display: flex; flex-wrap: wrap; -- 2.20.1