diff --git a/src/components/right/hooks/useProfileState.ts b/src/components/right/hooks/useProfileState.ts index b03ee0ff6..ab6bfd347 100644 --- a/src/components/right/hooks/useProfileState.ts +++ b/src/components/right/hooks/useProfileState.ts @@ -47,7 +47,7 @@ export default function useProfileState( } const tabListEl = container.querySelector('.TabList'); - if (!tabListEl) { + if (!tabListEl || tabListEl.offsetTop > container.scrollTop) { return; } diff --git a/src/util/fastSmoothScroll.ts b/src/util/fastSmoothScroll.ts index 4106ccab5..f7fc2fe26 100644 --- a/src/util/fastSmoothScroll.ts +++ b/src/util/fastSmoothScroll.ts @@ -7,6 +7,7 @@ import { FAST_SMOOTH_MAX_DISTANCE, FAST_SMOOTH_MAX_DURATION, FAST_SMOOTH_MIN_DURATION, FAST_SMOOTH_SHORT_TRANSITION_MAX_DISTANCE, } from '../config'; +import { IS_ANDROID } from './environment'; import { dispatchHeavyAnimationEvent } from '../hooks/useHeavyAnimationCheck'; import { animateSingle } from './animation'; @@ -89,7 +90,7 @@ function scrollWithJs( switch (position) { case 'start': - path = (elementTop - margin) - scrollFrom; + path = (elementTop - margin) - scrollFrom + (IS_ANDROID ? 1 : 0); break; case 'end': path = (elementTop + elementHeight + margin) - (scrollFrom + targetContainerHeight);