Yep, that's an old bummer : ) http://dev.rubyonrails.org/ticket/11142
- kangax On Jun 19, 5:35 pm, Lance <[EMAIL PROTECTED]> wrote: > Prototype v1.6.0.2 > > If any of an element's ancestors are hidden, Element.getDimensions() > returns misleading values. In order to address this in my own project, > I made the following modification: > > getDimensions: function(element) { > element = $(element); > var display = element.getStyle('display'); > + var hiddenAncestor = element.ancestors().any(function(e) > { return e.getStyle('display') == 'none'; }); > - if (display != 'none' && display != null) // Safari bug > + if (display != 'none' && display != null && !hiddenAncestor) // > Safari bug > . > . > . > > but I imagine there is a more efficient way of doing this. I wanted to > bring this to the community's attention, see if anyone agrees with me > that this check should be added, and find out if someone with more > skillz than I could provide a better solution. > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---