Thanks, kangax!

Do you know... which is the "proper" place to look for things like
this (patches, enhancements, etc.)? On the Rails Trac, or the
Prototype Lighthouse? or somewhere else? or are these being merged?

Also, looking at that patch, I realize that I didn't take into account
that the element I'm getting the dimensions of may not have its own
dimensions set. Oops. :)

One more, then I'll be on my merry way... What could I do to help get
this enhancement implemented?

Thanks again,
Lance

On Jun 19, 6:48 pm, kangax <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to