Firefox funkiness with attributes: offsetTop and offsetLeft
Submitted by
bnwest.
on 2007-07-06 17:20.
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.
