Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Developer Blog » Brian's Sooth » Firefox funkiness with attributes: offsetTop and offsetLeft

Firefox funkiness with attributes: offsetTop and offsetLeft Firefox funkiness with attributes: offsetTop and offsetLeft

Document Actions
Submitted by bnwest. on 2007-07-06 17:20. Development
Firefox funkiness with attributes: offsetTop and offsetLeft.

Part of EIP is to calculate the position / location of HTML nodes via a call to prototype.js's

Position.cumulativeOffset(nodeHtml);

In FF for some very limited cases, the above call was returning the wrong answer.  Examining the HTML in FF's DOM Inspector (via the attributes offsetTop, offsetLeft, and offsetParent), the problem appears to be with FF and not the logic in Position.cumulativeOffset().

Max solved the puzzle.  The HTML in question was

<table><tr> ...

and was "fixed" by adding a <tbody>

<table><tbody><tr> ...

Hat tip to Max.

Re: Firefox funkiness with attributes: offsetTop and offsetLeft

Posted by maxwell at 2007-07-09 16:55
So the moral of the story is .... wherever y'all write tables, also give them tbody children.
Developer Blog
« July 2008 »
Su Mo Tu We Th Fr Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
2008-07-02
12:53-12:53 Performance tests of module PDF generation
Categories:
Content (55)
Copyright (0)
Deep Code (3)
Development (198)
Markup (22)
Metadata (1)
Printing (7)
Style (9)
Testing (2)
Usability (6)