-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Modernizr.csstransforms false positives on Android 2.x devices #903
Comments
Can you put a test case together to show what you're on about. |
I'm just concatenating translateX transforms. Here's a gist which will fail on Android 2 : https://gist.github.com/laurentperez/5389923. If you click more than once on 'go right', the box will flicker back to 0,0, then go right without the transition. This works fine on Android 4 |
Android 2.x doesn't support animations on multiple properties either — that's widely documented, so we added a warning note in Modernizr (which will be exposed in the docs in v3). I don't think only supporting one animation qualifies as "not supporting animations". I wasn't aware it couldn't handle multiple transforms either, but suggest we follow the same pattern. Or even add a new |
The thing is that rotateY isn't supported either, it will do a rotateX instead. Modernizr.csstransforms3d returns false, this can be the case, here rotateY is 3d. However, translate3d(10px,0,0) will work, because the X axis is a 2d pane. Either 2d transforms fully work too, or they don't. Android 2.3 still has 40% OS share according to http://developer.android.com/about/dashboards/index.html. |
This is something I'm still struggling with because according to this Stack Overflow thread as well as my own testing, transforms don't work at all. It seems to depend on your viewport meta tag config. I think it should test false so fallbacks can be used. |
Ok, I’m leaning towards a UA sniff to blacklist Android 2.x – what do you think @ryanseddon? @laurentperez & @ScottSmith95 – could you provide test cases (CodePen / JSFiddle) demonstrating these bugs? We should also get these bugs reported on caniuse.com, which currently doesn’t flag Android 2.x as buggy at all. |
It's also notable that the Kindle Fire uses this version of Android too, but naturally reports a Mac OS X user agent. See this thread for more. |
@stucox I think that's fair to have a UA sniff we've resorted to it before in the history test so I'm cool if we can just blacklist android 2.x. |
Hi
We discovered that Android 2.x stock browsers :
were unable to chain css transforms, given the following code :
<script type="text/javascript"> var right = function(id, val, accel){ document.getElementById(id).style.webkitTransform += (accel ? "translate3d("+val+",0,0)" : "translateX(" + val + ")"); }; </script>any Android 2.x device will fail translating the box using a transition on multiple css transforms, only the first one will work. Subsequent ones will move the box back to its original position before moving it right, with no transition
I believe Modernizr.csstransforms should return false for all Android 2.x devices
Thanks
The text was updated successfully, but these errors were encountered: