orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.23k stars 223 forks source link

Infinite scroll down on firefox position scroll on top after fired event #383

Closed flucciarini closed 2 months ago

flucciarini commented 3 years ago

Hi Everyone I'm having an issue when use the component in firefox browser. After fire the onScroll event the scroll position reset on top. Working well on Chrome.

In my site I load the content of page dinamically and so I use infinite scroll as paginator to load next page's data and append it on bottom of page

.html file <div class="maincontent" infiniteScroll [scrollWindow]="true" [infiniteScrollDistance]="2" [infiniteScrollThrottle]="500" (scrolled)="onScroll()">

.ts file onScroll() { console.log('INFINITE SCROLL'); if (this.canLoadMore()) { //check to prevent multiple load this.loadMore(); //start load } }

Have anyone this same issue?

mattveraldi commented 3 years ago

I have the same problem with MS Edge

Jannyboy313 commented 3 years ago

I have the same problem with chrome

Cjoshua2 commented 2 years ago

I had the same problem, turns out my input tag has the focus attribute after I used it. Had to use the .blur() to remove it once the search is done.

Sorry for my english.