File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,12 @@ var ReactPullLoad = function (_Component) {
7676 }
7777 } , _this . setScrollTop = function ( value ) {
7878 if ( _this . defaultConfig . container ) {
79- var conH = _this . defaultConfig . container === document . body ? document . documentElement . clientHeight : _this . defaultConfig . container . offsetHeight ;
79+ var scrollH = _this . defaultConfig . container . scrollHeight ;
8080 if ( value < 0 ) {
8181 value = 0 ;
8282 }
83- if ( value > conH ) {
84- value = conH ;
83+ if ( value > scrollH ) {
84+ value = scrollH ;
8585 }
8686 return _this . defaultConfig . container . scrollTop = value ;
8787 } else {
Original file line number Diff line number Diff line change 11{
22 "name" : " react-pullload" ,
3- "version" : " 1.0.5 " ,
3+ "version" : " 1.0.6 " ,
44 "description" : " React compopnent pull down refresh and pull up load more" ,
55 "main" : " ./lib/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ export default class ReactPullLoad extends Component {
105105
106106 setScrollTop = ( value ) => {
107107 if ( this . defaultConfig . container ) {
108- let conH = this . defaultConfig . container === document . body ? document . documentElement . clientHeight : this . defaultConfig . container . offsetHeight
108+ let scrollH = this . defaultConfig . container . scrollHeight ;
109109 if ( value < 0 ) { value = 0 }
110- if ( value > conH ) { value = conH }
110+ if ( value > scrollH ) { value = scrollH }
111111 return this . defaultConfig . container . scrollTop = value ;
112112 } else {
113113 return 0 ;
You can’t perform that action at this time.
0 commit comments