Bug Tracker

Changes between Version 2 and Version 3 of Ticket #7871, comment 2

Jan 2, 2011, 1:38:39 PM (11 years ago)


  • Ticket #7871, comment 2

    v2 v3  
    9393This example will work even better than with 1.4.2 because now with that fix for 1.4.4 we can get all border-colors of the all 4 blocks(only 2 block in 1.4.2+FF, and 0 blocks in 1.4.4+FF)
    9494Also I checked Opera and IE, all works fine with that fix. But as I said before, maybe it's not the fastest way, but it shows where problem is.
     98After another look on the problem, i think main bug (of original 1.4.4) is in line 5487:
     100  #!js
     101if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
     102                ret = jQuery.style( elem, name );
     104  }}}
     105wrong code is "&& !jQuery.contains". This condition is never satisfied, there must be "&& jQuery.contains". Then things will work good.
     107But if we fix problem like this, it help with http://bugs.jquery.com/ticket/7746 ,but not with my ticket, bacause Bug in FF fill into computedStyle "0px" (not "" like it must be, when value can't be found) for all position values (top, left, right, bottom) when block set to "position: absolute, display: none" and sytle added by jquery.css({values})
     110 So, in my opinion, to do all best way, line 5487 must be fix like this:
     112  #!js
     113if ( ret === "" && jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
     114                ret = jQuery.style( elem, name );
     116  }}}
     117 And then added some fix to computedStyle in FF for blocks with "position: absolute, display: none" or even after fix we still will get in FF 3.6 0px for position values in blocks with "position: absolute, display: none", when styles was added by jquery.css({values});
     119Or we can just use code in my first update, it do some overwork, but get right results even for FF "position: absolute, display: none" + css set by jquery.css({values});