Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/theme-default/composables/outline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function useActiveAnchor(
const scrollY = window.scrollY
const innerHeight = window.innerHeight
const offsetHeight = document.body.offsetHeight
const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1
const isBottom = scrollY + innerHeight - offsetHeight >= 0

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you scroll from top to bottom, the value (without abs) goes something like this:

  • -1000 (top) -> 0 (bottom) -> +50 (max overscrolled bottom)


// resolvedHeaders may be repositioned, hidden or fix positioned
const headers = resolvedHeaders
Expand Down