From 40423d1f28f78d850ae11f8fdcccb2156c722444 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 7 Aug 2019 15:07:34 +0800 Subject: [PATCH] [bugfix] Sticky: incorrect position when inside scroll container (#4055) --- src/sticky/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sticky/index.js b/src/sticky/index.js index 2e1112b76..b42aac779 100644 --- a/src/sticky/index.js +++ b/src/sticky/index.js @@ -62,7 +62,7 @@ export default createComponent({ this.height = this.$el.offsetHeight; const { container, offsetTop } = this; - const scrollTop = getScrollTop(this.scroller); + const scrollTop = getScrollTop(window); const topToPageTop = getElementTop(this.$el); const emitScrollEvent = () => {