[bugfix] Sticky: incorrect position when inside scroll container (#4055)

This commit is contained in:
neverland 2019-08-07 15:07:34 +08:00 committed by GitHub
parent 1e9fe3fea6
commit 40423d1f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = () => {