fix: can’t detect that the page has scrolled to the bottom (fix #956)

pull/970/head
fi3ework 3 years ago
parent 7a9e4d9ee0
commit 7bf954d09a

@ -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) {

Loading…
Cancel
Save