File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,12 @@ InfiniteScroll.create.status = function() {
4848 this . on ( 'request' , this . showRequestStatus ) ;
4949 this . on ( 'error' , this . showErrorStatus ) ;
5050 this . on ( 'last' , this . showLastStatus ) ;
51+ this . bindHideStatus ( 'on' ) ;
52+ } ;
53+
54+ proto . bindHideStatus = function ( bindMethod ) {
5155 var hideEvent = this . options . append ? 'append' : 'load' ;
52- this . on ( hideEvent , this . hideAllStatus ) ;
56+ this [ bindMethod ] ( hideEvent , this . hideAllStatus ) ;
5357} ;
5458
5559proto . showRequestStatus = function ( ) {
@@ -62,6 +66,8 @@ proto.showErrorStatus = function() {
6266
6367proto . showLastStatus = function ( ) {
6468 this . showStatus ( 'last' ) ;
69+ // prevent last then append event race condition from showing last status #706
70+ this . bindHideStatus ( 'off' ) ;
6571} ;
6672
6773proto . showStatus = function ( eventName ) {
You canβt perform that action at this time.
0 commit comments