Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: IonInfiniteScroll bug on non-JS scrolling #3871

Closed
prashantpalikhe opened this issue Jun 1, 2015 · 6 comments
Closed

bug: IonInfiniteScroll bug on non-JS scrolling #3871

prashantpalikhe opened this issue Jun 1, 2015 · 6 comments

Comments

@prashantpalikhe
Copy link

Type: bug

Platform: mobile webview

I noticed that my app running on Android (with native scrolling) infinitely triggers on-infinite callback function when a state is changed before the first on-infinite callback is complete.

This codepen http://codepen.io/felquis/pen/vEbBpJ can be used to reproduce the issue. Just make sure, the JS scrolling is disabled.

The codepen was initially used on this thread http://forum.ionicframework.com/t/ion-infinite-scroll-is-looping-after-state-change-before-infinitescrollcomplete/19609 which also discusses the same issue.

Now after debugging, I found the buggy section of code which is in the function IonInfiniteScrollController::finishInfiniteScroll()

The code in there only check bounds again immediately if the page isn't cached but does so ONLY if JS scrolling is enabled. For non JS scrolling it always checks bound and since the cached view is display: none -ed, the check to see if we've scrolled far enough to trigger an infinite scroll always returns true.

The result, on-infinite is called infinitely.

@prashantpalikhe prashantpalikhe changed the title IonInfiniteScroll bug on non-JS scrolling bug: IonInfiniteScroll bug on non-JS scrolling Jun 1, 2015
@mhartington
Copy link
Contributor

Cool, thanks for the detailed description.
Can confirm that I see this happening as well.
Passing this to @perrygovier

@prashantpalikhe
Copy link
Author

@mhartington What is the status of this? Or should I create a PR?

@mhartington
Copy link
Contributor

You can if you want. PRs are always welcomed.

@mhartington mhartington added the needs: reply the issue needs a response from the user label Jul 14, 2015
@Ionitron
Copy link
Collaborator

Greetings @prashantpalikhe!

My sensors indicate a reply was requested, but as we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.

Thank you for allowing me to assist you.

@Ionitron Ionitron added ionitron:closed and removed needs: reply the issue needs a response from the user labels Aug 13, 2015
@zanemcca
Copy link

This is still an issue for me.
Have you found a solution @prashantpalikhe?

@zanemcca
Copy link

@mhartington @prashantpalikhe I found a simple fix for the issue. The max and current scroll height were both 0 and there was no checking for it. I added the condition in #4667

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants