@@ -55,7 +55,7 @@ import config, {
5555 evt3rdArg , WARNINGS , STATUS , SLOT_STYLES ,
5656} from ' ../config' ;
5757import {
58- warn , throttleer , loopTracker , scrollBarStorage , kebabCase ,
58+ warn , throttleer , loopTracker , scrollBarStorage , kebabCase , isVisible ,
5959} from ' ../utils' ;
6060
6161export default {
@@ -125,7 +125,7 @@ export default {
125125 spinner: String ,
126126 direction: {
127127 type: String ,
128- default: config . props . direction ,
128+ default: ' bottom ' ,
129129 },
130130 forceUseInfiniteWrapper: {
131131 type: [Boolean , String ],
@@ -148,7 +148,7 @@ export default {
148148
149149 this .scrollHandler = function scrollHandlerOriginal (ev ) {
150150 if (this .status === STATUS .READY ) {
151- if (ev && ev .constructor === Event ) {
151+ if (ev && ev .constructor === Event && isVisible ( this . $el ) ) {
152152 throttleer .throttle (this .attemptLoad );
153153 } else {
154154 this .attemptLoad ();
@@ -254,12 +254,10 @@ export default {
254254 * event handler
255255 */
256256 attemptLoad (isContinuousCall ) {
257- const currentDistance = this .getCurrentDistance ();
258-
259257 if (
260258 this .status !== STATUS .COMPLETE
261- && currentDistance <= this .distance
262- && ( this .$el . offsetWidth + this .$el . offsetHeight ) > 0
259+ && isVisible ( this .$el )
260+ && this .getCurrentDistance () <= this .distance
263261 ) {
264262 this .status = STATUS .LOADING ;
265263
0 commit comments