From 937df577f1b005ff4da2122e642c5c9f687d0069 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 1a9ab61ac1..9d46a7831f 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;