From 85338cf40a81db9c061cee9c7c41ffa3b31facac Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Tue, 1 Jan 2013 23:09:29 -0500 Subject: [PATCH] support: update to latest version of support --- js/jquery.mobile.support.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index ccc3ffb4207..6beb3cdc94b 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -33,12 +33,16 @@ 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 ); @@ -46,7 +50,7 @@ function validStyle( prop, value, check_vend ) { 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"); \ No newline at end of file