Why Ionic recreate the scroll?


#1

All my friends come up to me and ask “Felquis, why Ionic recreate the scroll?” and my answer is:

Because there’s some differences between iOS and Android scroll events, then to be able to create features like infinite-scroll, pull to refresh they need to use another alternative to do the scroll correctly in both platforms.

Than they ask: “Cool, what kind of bugs is there between iOS and Android?”

I cant’ find any explanations on Ionic forum/issues/stack about this to share with my friends.

If is there some good information, with references I’d like to read.

(sorry if this is a duplicate question)


#2

Less of an issue with bugs but events.

So scroll events have always been an issue with mobile

http://andyshora.com/mobile-scroll-event-problems.html

So we can’t do any thing great with that, like pull to refresh or infinite scroll.
That is why we went with a js -based scrolling solution.

But whats becoming evident is that js-scrolling is becoming problematic.
So we’ve decided to create a scroll-event polyfill and see if we can depreciate js-scrolling


#3

Ummmm Nice!

The problem is with old iOS right, “OLD” because… this demo works fine on iOS 8 safari (actually AMAZING), but on iOS7.1 it just doesn’t work!

Seems like iOS8 is firing events as well as manipulating the DOM while scrolling (tested in emulator). (but I can’t find any release notes talking about what is different on iOS8 :confused: ) (I really like sources to link)

So we’ve decided to create a scroll-event polyfill and see if we can depreciate js-scrolling

Do you have any content/link/article about the approach you are working on? I’ll give a talk next Saturday, I’d like to give a fresh review about whats coming in the next Ionic releases.


#4

I found this iOS7.1 to iOS8.0 diff, in the bottom has a Webkit (added), but I’m not sure what it means.


#5

Right, so iOS7 doesn’t fire scroll events until after the scroll is done.

iOS8 handles scroll events correctly.

Nothing written down yet, just some brainstorming stuff at the moment.


#6

Okay, thank you @mhartington