From 3ddc0e038358a50cf131d0e75f7cdc6d17bdb4b3 Mon Sep 17 00:00:00 2001 From: zhoucs <1041883243@qq.com> Date: Thu, 22 Jul 2021 14:15:30 +0800 Subject: [PATCH] feat: add the support for overlay of overflowY --- src/directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directive.js b/src/directive.js index fefbed0..a53cebe 100644 --- a/src/directive.js +++ b/src/directive.js @@ -49,7 +49,7 @@ var getScrollEventTarget = function (element) { // bugfix, see http://w3help.org/zh-cn/causes/SD9013 and http://stackoverflow.com/questions/17016740/onscroll-function-is-not-working-for-chrome while (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1) { var overflowY = getComputedStyle(currentNode).overflowY; - if (overflowY === 'scroll' || overflowY === 'auto') { + if (overflowY === 'scroll' || overflowY === 'auto' || overflowY === 'overlay') { return currentNode; } currentNode = currentNode.parentNode;