Permalink
Browse files

support: update to latest version of support

  • Loading branch information...
1 parent 69c96ca commit 85338cf40a81db9c061cee9c7c41ffa3b31facac Alexander Schmitz committed Jan 2, 2013
Showing with 10 additions and 6 deletions.
  1. +10 −6 js/jquery.mobile.support.js
@@ -33,20 +33,24 @@ function validStyle( prop, value, check_vend ) {
return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
},
vend_pref = function( vend ) {
- return "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-";
+ if( vend === "" ) {
+ return "";
+ } else {
+ return "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-";
+ }
},
check_style = function( vend ) {
var vend_prop = vend_pref( vend ) + prop + ": " + value + ";",
uc_vend = uc( vend ),
- propStyle = uc_vend + uc( prop );
+ propStyle = uc_vend + ( uc_vend === "" ? prop : uc( prop ) );
div.setAttribute( "style", vend_prop );
if ( !!div.style[ propStyle ] ) {
ret = true;
}
},
- check_vends = check_vend ? [ check_vend ] : vendors,
+ check_vends = check_vend ? check_vend : vendors,
ret;
for( var i = 0; i < check_vends.length; i++ ) {
@@ -55,10 +59,10 @@ function validStyle( prop, value, check_vend ) {
return !!ret;
}
-// Thanks to Modernizr src for this test idea. `perspective` check is limited to Moz to prevent a false positive for 3D transforms on Android.
+// Thanks to Modernizr src for this test idea. `perspective` check is limited to Moz/unprefixed to prevent a false positive for 3D transforms on Android.
function transform3dTest() {
var prop = "transform-3d";
- return validStyle( 'perspective', '10px', 'moz' ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
+ return validStyle( 'perspective', '10px', ['moz', ''] ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
}
// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
@@ -190,4 +194,4 @@ if ( !$.support.boxShadow ) {
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
-//>>excludeEnd("jqmBuildExclude");
+//>>excludeEnd("jqmBuildExclude");

0 comments on commit 85338cf

Please sign in to comment.