mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Fixes a false positive for 3D transform support on Android 2.3 (possibly others).
This commit is contained in:
parent
c5f1fd5831
commit
abfec80413
1 changed files with 7 additions and 2 deletions
|
|
@ -29,8 +29,13 @@ function propExists( prop ) {
|
|||
|
||||
// Thanks to Modernizr src for this test idea
|
||||
function transform3dTest() {
|
||||
var prop = "transform-3d";
|
||||
return propExists( "perspective" ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
|
||||
var prop = "transform-3d",
|
||||
div = document.createElement('div');
|
||||
|
||||
div.setAttribute('style', '-moz-perspective: 100px');
|
||||
/* Android 2.3 (at least) returns a positive for 3D-specific properties—`perspective`, `perspective-origin`, `backface-visibility—necessitating` the preceeding approach to pass FF10+. */
|
||||
|
||||
return div.style.MozPerspective !== undefined || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
|
||||
}
|
||||
|
||||
// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
|
||||
|
|
|
|||
Loading…
Reference in a new issue