Skip to content

Commit

Permalink
Check for any overflow scroll style on parent node.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxl881 committed Mar 13, 2018
1 parent 3dc5c99 commit 7217cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/scrollParent.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ exports.default = function (node) {
continue;
}

if (overflowRegex.test(overflow) && overflowRegex.test(overflowX) && overflowRegex.test(overflowY)) {
if (overflowRegex.test(overflow) || overflowRegex.test(overflowX) || overflowRegex.test(overflowY)) {
return parent;
}

parent = parent.parentNode;
}

return node.ownerDocument || node.documentElement || document.documentElement;
};
};

0 comments on commit 7217cb6

Please sign in to comment.