Skip to content

Commit

Permalink
Merge 4535cf6 into d4fde73
Browse files Browse the repository at this point in the history
  • Loading branch information
aohua committed Jan 6, 2018
2 parents d4fde73 + 4535cf6 commit c5a7112
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
.widget-list.overflow {
position: relative;
height: 500px;
display: flex;
flex-direction: column;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
Expand Down Expand Up @@ -54,7 +56,7 @@
}
.loading, .widget {
width: 100%;
height: 200px;
flex-grow: 1;
text-align: center;
padding-top: 50px;
margin: 10px 0;
Expand Down
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class LazyLoad extends Component {
this.props.children :
this.props.placeholder ?
this.props.placeholder :
<div style={{ height: this.props.height }} className="lazyload-placeholder" />;
<div style={{ height: this.props.height, minHeight: this.props.height }} className="lazyload-placeholder" />;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/scrollParent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion test/specs/lazyload.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<div
id="realOverflowContainer"
Expand Down

0 comments on commit c5a7112

Please sign in to comment.