From ddbe23689812bd8cb85a16a6ed12af588ea6a2e9 Mon Sep 17 00:00:00 2001 From: kleinsea Date: Wed, 19 May 2021 17:10:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86ios=E4=B8=AD=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E5=BC=B9=E6=80=A7=E5=8A=A8=E7=94=BB=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8C=89=E9=92=AE=E9=9A=90=E8=97=8F=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Dial/AutoHidden.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/component/Dial/AutoHidden.js b/src/component/Dial/AutoHidden.js index 5fa7a422..909d2219 100644 --- a/src/component/Dial/AutoHidden.js +++ b/src/component/Dial/AutoHidden.js @@ -11,8 +11,10 @@ function AutoHidden({ children, enable }) { useEffect(() => { const handleNavigation = (e) => { const window = e.currentTarget; - - if (prev > window.scrollY) { + if(window.scrollY < 0) { + lastUpdate = window.scrollY; + setHidden(false); + } else if (prev > window.scrollY) { if (lastUpdate - window.scrollY > show) { lastUpdate = window.scrollY; setHidden(false);