Next time, please see:
http://prototypejs.org/contribute

Note that I *think* this will fail in browsers that don't support  
computed border widths (that is, units other then 'px' normalized to  
pixels), namely IE; plus it will cause performance problems.

Without unit tests to properly test this, we can't go forward on this  
one.
Please consider opening a ticket on the Trac, with a proper patch  
file and extended unit tests for this.

best,
thomas

Am 04.03.2007 um 21:42 schrieb Searle:

>
> I can't be bothered to find out how to open a bug report, so I'll just
> put it here. Maybe somone cares.
>
> cumulativeOffset ignores borders of parent elements, which is wrong.
> It was hard to find any information because ALL implementations I
> found were wrong but one. (Astonishing, it's very basic.)
> cumulativeOffset should read something like this:
>
>   cumulativeOffset: function(element) {
>     var valueT = 0, valueL = 0;
>     do {
>       valueT += element.offsetTop  || 0;
>       valueL += element.offsetLeft || 0;
>
> +      valueT += Element.getStyle(element, 'borderTopWidth') || 0;
> +      valueL += Element.getStyle(element, 'borderLeftWidth') || 0;
>
>       element = element.offsetParent;
>     } while (element);
>     return [valueL, valueT];
>   },
>
> Sorry, untestet.
>
> Cheers,
> Searle
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to