From 8231afe6d1849dc712c4592119db1eaa0ab16455 Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Tue, 15 Mar 2022 14:38:26 +0500 Subject: [PATCH] Web: Client: fixed visible for banner --- .../src/components/Layout/MobileLayout.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/ASC.Web.Client/src/components/Layout/MobileLayout.js b/web/ASC.Web.Client/src/components/Layout/MobileLayout.js index dd29d77a09..960a3c832b 100644 --- a/web/ASC.Web.Client/src/components/Layout/MobileLayout.js +++ b/web/ASC.Web.Client/src/components/Layout/MobileLayout.js @@ -77,6 +77,14 @@ class MobileLayout extends Component { return; } + if (currentScrollPosition <= 150 && prevScrollPosition === 0) { + if (!this.state.visibleContent) + this.setState({ + visibleContent: true, + }); + return; + } + if ( (isSafari || isIOS) && Math.abs(currentScrollPosition - prevScrollPosition) <= 112 && @@ -89,7 +97,7 @@ class MobileLayout extends Component { return; } - if (Math.abs(currentScrollPosition - prevScrollPosition) <= 112) { + if (Math.abs(currentScrollPosition - prevScrollPosition) <= 240) { return; } @@ -111,7 +119,7 @@ class MobileLayout extends Component { } this.setState({ - prevScrollPosition: currentScrollPosition, + prevScrollPosition: prevScrollPosition, visibleContent: isVisible, }); };