Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 4d4ff39

Browse files
committed
Website: fix header that might be hidden for browsers that allow negative scroll
1 parent 4c1794e commit 4d4ff39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/src/modules/headroom.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ if (headroom) {
1111

1212
const update = () => {
1313
const scroll = getScrollTop()
14+
15+
// ignore scroll out of the page (hi Safari!)
16+
if (scroll < 0) {
17+
return true
18+
}
19+
1420
if (scroll > previousScroll + step) {
1521
headroom.classList.add("js-Headroom--hide")
1622
previousScroll = scroll

0 commit comments

Comments
 (0)