Skip to content

Commit b4b9cc8

Browse files
authored
fix(ui): correct show-scroll-to-top logic (#2127)
1 parent b66749e commit b4b9cc8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/components/Package/Header.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const props = defineProps<{
1818
}>()
1919
2020
const { requestedVersion, orgName } = usePackageRoute()
21-
const { scrollToTop, isTouchDeviceClient } = useScrollToTop()
21+
const { scrollToTop } = useScrollToTop()
2222
const packageHeaderHeight = usePackageHeaderHeight()
2323
2424
const header = useTemplateRef('header')
@@ -61,9 +61,7 @@ onBeforeUnmount(() => {
6161
const navExtraOffsetStyle = { '--package-nav-extra': '0px' }
6262
6363
const { y: scrollY } = useScroll(window)
64-
const showScrollToTop = computed(
65-
() => isTouchDeviceClient.value && scrollY.value > SCROLL_TO_TOP_THRESHOLD,
66-
)
64+
const showScrollToTop = computed(() => scrollY.value > SCROLL_TO_TOP_THRESHOLD)
6765
6866
const packageName = computed(() => props.pkg?.name ?? '')
6967
const compactNumberFormatter = useCompactNumberFormatter()

0 commit comments

Comments
 (0)