Yeah, this has been fixed for a while now. The one case that isn't accounted for (yet) is having a parent element that has a display set to none - that kills computedStyle for all sub-elements. Unfortunately, the hack to work around that is too monstrous to comprehend. For now, it works fine in Safari for most cases, and that's what matters.
--John On 11/29/06, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Hi all, > > A while ago I reported a bug, which I couldn't really narrow down, so it > never went into a ticket: > http://jquery.com/discuss/2006-August/010401/ > > The problem was that in line 1315: > > ret = > document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); > > document.defaultView.getComputedStyle(this,null) returns null causing an > error in Safari obviously. > > I fixed it with the following: > > ret = document.defaultView.getComputedStyle(this,null) && > document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); > > A few minutes ago I stumbled upon a post, which exactly explains that bug: > http://snook.ca/archives/javascript/safari2_display-none_getcomputedstyle/ > > So I wonder if we should merge the fix into jQuery finally? > > > -- Klaus > > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
