Patched jquery-1.4.2 to not crash in IE7 when a style property is set with 'null...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 11 May 2010 19:25:44 +0000 (19:25 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 11 May 2010 19:25:44 +0000 (19:25 +0000)
includes/DefaultSettings.php
skins/common/jquery-1.4.2.js
skins/common/jquery-1.4.2.min.js

index 73e819f..1e3aa91 100644 (file)
@@ -1677,7 +1677,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '278';
+$wgStyleVersion = '279';
 
 
 # Server-side caching:
index c63f08d..4f8a4db 100644 (file)
@@ -4614,7 +4614,7 @@ jQuery.extend({
 
                name = name.replace(rdashAlpha, fcamelCase);
 
-               if ( set ) {
+               if ( set && value !== 'NaNpx' && value !== 'nullpx' ) {
                        style[ name ] = value;
                }
 
index 0a79bac..af6f67e 100644 (file)
@@ -346,7 +346,7 @@ if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined;}
 var style=elem.style||elem,set=value!==undefined;if(!jQuery.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")";var filter=style.filter||jQuery.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;}
 return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":"";}
 if(rfloat.test(name)){name=styleFloat;}
-name=name.replace(rdashAlpha,fcamelCase);if(set){style[name]=value;}
+name=name.replace(rdashAlpha,fcamelCase);if(set&&value!=='NaNpx'&&value!=='nullpx'){style[name]=value;}
 return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight;function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}
 jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;}
 if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}