Skip to content

Commit

Permalink
fix: can't detect that the page has scrolled to the bottom (#956) (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jul 12, 2022
1 parent 7a9e4d9 commit 98e45af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/theme-default/composables/outline.ts
Expand Up @@ -105,7 +105,7 @@ export function useActiveAnchor(
const scrollY = window.scrollY
const innerHeight = window.innerHeight
const offsetHeight = document.body.offsetHeight
const isBottom = scrollY + innerHeight === offsetHeight
const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1

// page bottom - highlight last one
if (anchors.length && isBottom) {
Expand Down

0 comments on commit 98e45af

Please sign in to comment.