On 27-May-06, at 12:46 AM, Hamish Friedlander wrote:

> Whoops. Not sure why the partial send. Apologies to group. Lets try  
> again
>
> There appears to be a bug in getElementPosition. At the top of the  
> function is
>
> if (elem.x && elem.y) {
>     /* it's just a MochiKit.Style.Coordinates object */
>
> It seems like ( in Firefox at any rate ) several normal DOM  
> elements have x and y attributes. At least one of these is  
> generally set to 0, so the && test fails and there aren't any  
> problems. However on some floating elements this is not true and  
> the wrong result is returned.
>
> My poor workaround is to add isUndefinedOrNull(elem.nodeType) to  
> the test to try and eliminate the false matches. I'm not sure what  
> the original intent of supporting arbitrary positioning using x and  
> y attributes was though - is there a better way to detect this?

Hamish,

Do you remember which DOM elements had nonzero x and y attributes?  
The problem should be fixed in trunk, but I'd like to add a test case  
for this.

Thanks,
Beau

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to