From 28363d4285c89466d48008a23af01bb1fce8aed5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 13 Jul 2020 15:13:02 +0900 Subject: [PATCH] fix(client): Fix sticky sidebar behavior --- src/client/scripts/sticky-sidebar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/scripts/sticky-sidebar.ts b/src/client/scripts/sticky-sidebar.ts index 1a9ab61ac..9d46a7831 100644 --- a/src/client/scripts/sticky-sidebar.ts +++ b/src/client/scripts/sticky-sidebar.ts @@ -22,7 +22,7 @@ export class StickySidebar { if (this.isTop) { this.isTop = false; - this.spacer.style.marginTop = `${scrollTop}px`; + this.spacer.style.marginTop = `${this.lastScrollTop}px`; } } else { // upscroll const overflow = this.el.clientHeight - window.innerHeight;