r74326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74325‎ | r74326 | r74327 >
Date:21:51, 5 October 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixed jQuery bug/enahnced jQuery to not blindly convert anything that's not a string to an integer and append 'px', resulting in values like "nullpx" and "NaNpx" which would cause errors in Internet Explorer. Now we are using ( parseInt( size ) || 0 ) + "px" so that if size is null or NaN it will be converted to 0. I've also passed this upstream (http://dev.jquery.com/ticket/7116)
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.js
@@ -6230,7 +6230,7 @@
62316231 jQuery.css( elem, type ) :
62326232
62336233 // Set the width or height on the element (default to pixels if value is unitless)
6234 - this.css( type, typeof size === "string" ? size : size + "px" );
 6234+ this.css( type, typeof size === "string" ? size : ( parseInt( size ) || 0 ) + "px" );
62356235 };
62366236
62376237 });

Follow-up revisions

RevisionCommit summaryAuthorDate
r86106Updating jQuery from 1.4.2->1.4.4, for better data-* support. 1.4.4 contains ...diebuche07:28, 15 April 2011

Status & tagging log