File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ proto.createHistoryPageLoad = function() {
9292 this . on ( 'load' , this . onPageLoadHistory ) ;
9393} ;
9494
95- InfiniteScroll . destroy . history = function ( ) {
95+ InfiniteScroll . destroy . history =
96+ proto . destroyHistory = function ( ) {
9697 var isHistoryAppend = this . options . history && this . options . append ;
9798 if ( isHistoryAppend ) {
9899 this . bindHistoryAppendEvents ( false ) ;
@@ -187,6 +188,8 @@ proto.onBeforeunload = function() {
187188 // calculate where scroll position would be on refresh
188189 var scrollPage = this . scrollPages [ pageIndex ] ;
189190 var scrollY = window . pageYOffset - scrollPage . top + this . top ;
191+ // disable scroll event before setting scroll #679
192+ this . destroyHistory ( ) ;
190193 scrollTo ( 0 , scrollY ) ;
191194} ;
192195
You can’t perform that action at this time.
0 commit comments