-
Notifications
You must be signed in to change notification settings - Fork 371
Closed
Labels
Description
Version
2.2.1
Vue.js version
2.5
What is expected?
Catch scroll event from 'body' element
What is actually happening?
Scroll even isn't caught
How to reproduce this problem?
add style 'overflow-y: scroll' to 'body' element
Solution:
update 'getScrollParent' method to check for 'BODY' tag at last place
`
getScrollParent (elm = this.$el) {
let result
if (!this.forceUseInfiniteWrapper && ['scroll', 'auto'].indexOf(getComputedStyle(elm).overflowY) > -1) {
result = elm
} else if (elm.hasAttribute('infinite-wrapper') || elm.hasAttribute('data-infinite-wrapper')) {
result = elm
} else if (elm.tagName === 'BODY') {
result = window
}
return result || this.getScrollParent(elm.parentNode)
}
`