ramjet icon indicating copy to clipboard operation
ramjet copied to clipboard

use offsetParent for correct position of children of statically positioned nodes

Open Rich-Harris opened this issue 9 years ago • 0 comments

not ready for merge

Wild things start happening when you transform descendants of statically positioned nodes, because the absolute positioning (which is necessary to avoid insane layout glitches) is calculated on the wrong basis (node.parentNode rather than node.offsetParent). This fixes that, but it introduces another bug – if you have transformed nodes between the offset parent and the transformed node, the transforms aren't correctly applied.

Rich-Harris avatar Feb 05 '16 20:02 Rich-Harris