diff --git a/packages/loadmore/src/loadmore.vue b/packages/loadmore/src/loadmore.vue index 431b7318..d20fefc2 100644 --- a/packages/loadmore/src/loadmore.vue +++ b/packages/loadmore/src/loadmore.vue @@ -204,14 +204,10 @@ getScrollEventTarget(element) { let currentNode = element; - while (currentNode && currentNode.tagName !== 'HTML' && + if (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1) { - let overflowY = document.defaultView.getComputedStyle(currentNode).overflowY; - if (overflowY === 'scroll' || overflowY === 'auto') { return currentNode; } - currentNode = currentNode.parentNode; - } return window; },