We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f421aae commit 0381ffcCopy full SHA for 0381ffc
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "react-lazy-load",
3
- "version": "3.0.3",
+ "version": "3.0.4",
4
"description": "Simple lazy loading component built with react",
5
"main": "./lib/LazyLoad.js",
6
"scripts": {
src/utils/parentScroll.js
@@ -14,11 +14,15 @@ const scrollParent = (element) => {
14
let parent = element;
15
16
while(parent) {
17
+ if (parent === document.documentElement || parent !== document.body) {
18
+ break;
19
+ }
20
+
21
if (!parent.parentNode) {
- return window;
22
23
}
24
- if (parent !== document.body && /(scroll|auto)/.test(overflow(parent))) {
25
+ if (/(scroll|auto)/.test(overflow(parent))) {
26
return parent;
27
28
0 commit comments