diff options
| author | Tyler Bello <tylerbello@users.sourceforge.net> | 2009-05-29 20:36:40 +0000 |
|---|---|---|
| committer | Tyler Bello <tylerbello@users.sourceforge.net> | 2009-05-29 20:36:40 +0000 |
| commit | 11e27003136f724c53ba1269b3c98118c50f5cd0 (patch) | |
| tree | d1568746f219fef8144c287c827efcac7b3a381d /javascript/libs | |
| parent | a54f3cbe347dc1eef268208ad565e8a7d9c11137 (diff) | |
| download | util-11e27003136f724c53ba1269b3c98118c50f5cd0.tar.gz util-11e27003136f724c53ba1269b3c98118c50f5cd0.tar.bz2 util-11e27003136f724c53ba1269b3c98118c50f5cd0.zip | |
Fix for invalid (negative) css attributes that cause error in IE 7 & 8
Diffstat (limited to 'javascript/libs')
| -rw-r--r-- | javascript/libs/jquery/full/jquery.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/javascript/libs/jquery/full/jquery.js b/javascript/libs/jquery/full/jquery.js index 9263574..da51be7 100644 --- a/javascript/libs/jquery/full/jquery.js +++ b/javascript/libs/jquery/full/jquery.js @@ -1057,10 +1057,23 @@ jQuery.extend({ return letter.toUpperCase(); }); - if ( set ) - elem[ name ] = value; - + if ( set ){ + // {{{ BIT_MOD + //Workaround for known bug: http://osdir.com/ml/jQuery/2009-05/msg01006.html + // http://groups.google.com/group/jquery-en/msg/43df4c068cd0145b + // http://dev.jqueryui.com/ticket/3901 + // http://www.n8williams.com/devblog/javascript_and_ajax/jquery-dialog-error-in-ie7-runtime-error-invalid-argument + //May be removed in future versions + if(typeof(value)=="string" && value.match(/[^0-9.]/) && parseInt(value) < 0){ + elem[ name ] = 0; + } + else{ + elem[ name ] = value; + } + // }}} BIT_MOD + } return elem[ name ]; + }, trim: function( text ) { |
