File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ class BottomScrollListener extends Component {
1818 }
1919
2020 handleOnScroll ( ) {
21- if ( document . body . scrollHeight - this . props . offset <= ( document . body . scrollTop + window . innerHeight ) ) {
21+ const scrollNode = document . scrollingElement || document . documentElement ;
22+
23+ if ( scrollNode . scrollHeight - this . props . offset <= ( scrollNode . scrollTop + window . innerHeight ) ) {
2224 this . props . onBottom ( ) ;
2325 }
2426 }
Original file line number Diff line number Diff line change 11{
22 "name" : " react-bottom-scroll-listener" ,
3- "version" : " 1.0.3 " ,
3+ "version" : " 1.1.0 " ,
44 "description" : " A simple React component that lets you listen for when you have scrolled to the bottom." ,
55 "main" : " dist/react-bottom-scroll-listener.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments