Computed style margins return incorrect values.
|Reported by nige.ani...@gmail.com, Oct 5 2009||Back to list|
Oct 6 2009,
Dec 1 2009,
HEY! Cab we have some action on this! This is a BUG and a bad one! It simply reports a completely erroneous margin value. SO we cannot work out how much space is taken up by an element including its margins!
Mar 4 2010,
YO! Some action on this?
Apr 17 2010,
Apr 26 2010,
*prod* Some movement on this would be great. Webkit can read margin-right fine on display:none elements, it only fails on block elements.
Jun 17 2010,
If this helps anyone, I've been able to workaround this issue by appending the problem element I want to measure in a div with position:absolute applied to it. No other styles are needed on that extra parent and the problem element then reports the correct computed style. I hope this helps.
Jun 29 2010,
I Ran into the same problem today using Mootools, so I dove into their sourcecode and started narrowing down the possible troublemakers. Eventually this resulted in the attached test.htm file: in Firefox and Opera the test page alerts '0px', in Safari and Chrome '150px', the exact difference between the parent en child elements' widths. I am going to give siunmaru's workaround a try, let's hope for the best!
Feb 4 2011,
See https://bugs.webkit.org/show_bug.cgi?id=13343 for a first patch.
Feb 16 2011,
Fixed in Webkit 78436 and latest Chromium build.
Mar 13 2012,
Oct 13 2012,
This issue has been closed for some time. No one will pay attention to new comments. If you are seeing this bug or have new data, please click New Issue to start a new bug.
Sign in to add a comment