Closed Bug 50050 Opened 24 years ago Closed 24 years ago

getComputedStyle and nested absolute DIV tags

Categories

(Core :: DOM: CSS Object Model, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 49942

People

(Reporter: scotty, Assigned: jst)

Details

getComputedStyle returns incorrect values on nested absolute DIV tags. For 
example:

<HTML>
<HEAD>
<STYLE>
.abs {
  position: absolute;
}
</STYLE>
<SCRIPT>
  function showWidth(strName) {
    alert(getComputedStyle(document.getElementById(strName), 
null).getPropertyValue('width'));
  }
</SCRIPT>
</HEAD>
<BODY>
<DIV CLASS="abs" ID="foo">
  Single &lt;DIV&gt;
</DIV><BR><BR>
<INPUT TYPE="Button" VALUE="Test" onClick="showWidth('foo');">
<BR>
<DIV CLASS="abs">
  <DIV CLASS="abs" ID="bar">
    Nested &lt;DIV&gt;s
  </DIV>
</DIV><BR><BR>
<INPUT TYPE="Button" VALUE="Test" onClick="showWidth('bar');">
</BODY>
</HTML>

Affected properties:
width, height, right, bottom

Probably related in some way to Bug #49942.
I'd say this is related to bug 49942 enough to dupe this. Fixing bug 49942 will
fix this one too.

*** This bug has been marked as a duplicate of 49942 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified dupe.
Status: RESOLVED → VERIFIED
Component: DOM Level 2 → DOM Style
You need to log in before you can comment on or make changes to this bug.