From cb00691c9b715cad7df6e143d2361aa3a2db07c6 Mon Sep 17 00:00:00 2001 From: AOHUA Date: Thu, 4 Jan 2018 17:59:10 +0800 Subject: [PATCH 1/4] fix wrong condition for detecting overflow container --- src/utils/scrollParent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/scrollParent.js b/src/utils/scrollParent.js index ec5c785..8625084 100644 --- a/src/utils/scrollParent.js +++ b/src/utils/scrollParent.js @@ -27,7 +27,7 @@ export default (node) => { continue; } - if (overflowRegex.test(overflow) && overflowRegex.test(overflowX) && overflowRegex.test(overflowY)) { + if (overflowRegex.test(overflow) || overflowRegex.test(overflowX) || overflowRegex.test(overflowY)) { return parent; } From 89711b6fd625eb6f41062c41a24dda8669306362 Mon Sep 17 00:00:00 2001 From: AOHUA Date: Thu, 4 Jan 2018 18:00:14 +0800 Subject: [PATCH 2/4] fix detecting true height of the placeholder in flex container --- examples/index.html | 2 ++ src/index.jsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/index.html b/examples/index.html index e261462..20d1afd 100644 --- a/examples/index.html +++ b/examples/index.html @@ -25,6 +25,8 @@ .widget-list.overflow { position: relative; height: 500px; + display: flex; + flex-direction: column; overflow-y: scroll; -webkit-overflow-scrolling: touch; } diff --git a/src/index.jsx b/src/index.jsx index 2b6b090..a80af10 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -284,7 +284,7 @@ class LazyLoad extends Component { this.props.children : this.props.placeholder ? this.props.placeholder : -
; +
; } } From fbab4372fc0fcc5ba3900fee30920a6cbede8b87 Mon Sep 17 00:00:00 2001 From: MU AOHUA Date: Sat, 6 Jan 2018 17:52:05 +0800 Subject: [PATCH 3/4] fix example's flexbox issue on IE11 --- examples/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/index.html b/examples/index.html index 20d1afd..13b4ad0 100644 --- a/examples/index.html +++ b/examples/index.html @@ -56,7 +56,7 @@ } .loading, .widget { width: 100%; - height: 200px; + flex-grow: 1; text-align: center; padding-top: 50px; margin: 10px 0; From 4535cf69173d2abe8578722b46cc1361a67231db Mon Sep 17 00:00:00 2001 From: MU AOHUA Date: Sat, 6 Jan 2018 18:04:48 +0800 Subject: [PATCH 4/4] fix typo --- test/specs/lazyload.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/lazyload.spec.js b/test/specs/lazyload.spec.js index f69ef37..4aed7bc 100644 --- a/test/specs/lazyload.spec.js +++ b/test/specs/lazyload.spec.js @@ -221,7 +221,7 @@ describe('LazyLoad', () => { describe('Overflow', () => { // https://github.com/jasonslyvia/react-lazyload/issues/71 // http://stackoverflow.com/a/6433475/761124 - it('should not detect a overflow container when only one of the scroll property is auto\/scroll', () => { + it('should not detect an overflow container when only one of the scroll property is auto\/scroll', () => { ReactDOM.render(