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

Scrolling not inertial on mobile safari #59

Closed
aquach opened this issue Jan 13, 2016 · 7 comments
Closed

Scrolling not inertial on mobile safari #59

aquach opened this issue Jan 13, 2016 · 7 comments
Assignees

Comments

@aquach
Copy link

aquach commented Jan 13, 2016

When using VirtualScroll in an iOS app, the scrolling is not inertial. I think this can be fixed by adding -webkit-overflow-scrolling: touch to the VirtualScroll div, but I thought I'd flag it here so you could investigate it on mobile yourself.

@bvaughn
Copy link
Owner

bvaughn commented Jan 13, 2016

Great suggestion. Thank you! I will try this. :)

@aquach
Copy link
Author

aquach commented Jan 13, 2016

Sure thing! I'm now looking into issues relating to https://www.tjvantoll.com/2012/08/19/onscroll-event-issues-on-mobile-browsers/ : the onScroll handler will not fire until the very end of the inertial scroll, which means new elements will not be rendered until the scroll stops. I'm looking into how we can fire onScroll events during the middle of the inertial scroll so that this doesn't happen.

@bvaughn
Copy link
Owner

bvaughn commented Jan 15, 2016

Initial testing seems promising (at least in the simulator).

@aquach
Copy link
Author

aquach commented Jan 15, 2016

Cool! Regarding my other issue: I've found that scrollTop is not updated until the end of the scroll when using UIWebView (but not Safari), which makes it impossible to update the visible cells during the inertial scroll :(

@bvaughn
Copy link
Owner

bvaughn commented Jan 15, 2016

@aquach Can you check out the issues/53-and-59 branch? Give the demo app a spin on your phone and let me know what you think?

You can set the "Overscan" value to something like 5 or 10 and then scroll around and see how the smoothness feels. It should be much less flickery than before (at least in my testing).

@bvaughn bvaughn self-assigned this Jan 15, 2016
@bvaughn
Copy link
Owner

bvaughn commented Jan 16, 2016

I think I'm going to proceed with a point release of this feature only and leave #53 as a separate issue until I hear back from you. :)

bvaughn added a commit that referenced this issue Jan 16, 2016
…nertial scrolling on mobile devices.
bvaughn added a commit that referenced this issue Jan 16, 2016
Added `-webkit-overflow-scrolling: touch` for smoother inertial scrolling on mobile devices
@aquach
Copy link
Author

aquach commented Jan 16, 2016

Awesome, thanks! I'll check out the other one.

On Sat, Jan 16, 2016 at 10:06 AM Brian Vaughn notifications@github.com
wrote:

Closed #59 #59 via
#63 #63.


Reply to this email directly or view it on GitHub
#59 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants