fix: edge case
This commit is contained in:
@@ -34,7 +34,12 @@ class SiteHeader extends HTMLElement {
|
|||||||
this.collapsibleHeight = this.collapsible.scrollHeight;
|
this.collapsibleHeight = this.collapsible.scrollHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isScrollingDown) {
|
// Always show header when at top of page
|
||||||
|
if (currentScrollPos === 0) {
|
||||||
|
this.upwardScroll = 0;
|
||||||
|
this.headerOffset = 0;
|
||||||
|
this.classList.add("reveal");
|
||||||
|
} else if (isScrollingDown) {
|
||||||
this.upwardScroll = 0;
|
this.upwardScroll = 0;
|
||||||
this.headerOffset = Math.min(
|
this.headerOffset = Math.min(
|
||||||
this.collapsibleHeight,
|
this.collapsibleHeight,
|
||||||
|
|||||||
Reference in New Issue
Block a user