It used to be (before iOS 8) that Safari couldn't natively animate on scroll, you had to stop scrolling to see the animations. Safari solved that issue, but when accessing the same website on Chrome (running in iOS) the issue persists. I read that chrome hasn't yet updated this on iOS. I know that it works great on Android... so... Is there a way to test for this "feature" either with modernizr or other js? I would like to disable animations on scroll if they are not supported. I've been able to accomplish this by checking which browser the user is using, but it would be easier if I could just check whether the functionality is available.
Asked
Active
Viewed 1,089 times
1 Answers
0
Before iOS 8, iOS would pause painting while the user was scrolling. This behavior was discontinued for applications using WKWebView
but remains for browsers using UIWebView
— this is why you only see the old behavior for certain third-party applications.
One approach is to detect whether your page is loaded inside WKWebView
or not. An answer to another question suggests testing for indexedDB
support. indexedDB
is the only HTML5 feature difference between the WKWebView
and UIWebView
.
The snippet from the other answer suggests how to do this:
if (navigator.platform.substr(0,2) === 'iP'){
//iOS (iPhone, iPod or iPad)
if (window.indexedDB) {
//WKWebView
}
}

Community
- 1
- 1

Chris Droukas
- 3,196
- 1
- 23
- 26
-
This looks interesting. I will give it a try and get back to you. Thanks. – Nov 25 '15 at 17:13