Bug Tracker

Changeset 4219

Show
Ignore:
Timestamp:
12/18/07 15:09:23 (1 year ago)
Author:
malsup
Message:

Fix top border issues when rounding in IE

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/corner/jquery.corner.js

    r3417 r4219  
    22 * jQuery corner plugin 
    33 * 
    4  * version 1.91 (9/21/2007) 
     4 * version 1.92 (12/18/2007) 
    55 * 
    66 * Dual licensed under the MIT and GPL licenses: 
     
    5454 
    5555$.fn.corner = function(o) { 
     56    var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent); 
     57    function sz(el, p) { return parseInt($.css(el,p))||0; }; 
    5658    function hex2(s) { 
    5759        var s = parseInt(s).toString(16); 
     
    144146                        ds.width = '100%'; 
    145147                } 
     148                else if (!bot && $.browser.msie) { 
     149                    if ($.css(this,'position') == 'static') 
     150                        this.style.position = 'relative'; 
     151                    ds.position = 'absolute'; 
     152                    ds.top = ds.left = ds.right = ds.padding = ds.margin = '0'; 
     153                     
     154                    // fix ie6 problem when blocked element has a border width 
     155                    var bw = 0; 
     156                    if (ie6 || !$.boxModel) 
     157                        bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth'); 
     158                    ie6 ? ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"') : ds.width = '100%'; 
     159                } 
    146160                else { 
    147161                    ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' :