Closed Bug 288914 Opened 20 years ago Closed 20 years ago

incorrect DOM handling: inline tags (such as SPAN, LABEL) wrap block elements (such as TABLE, DIV) wrong.

Categories

(Core :: DOM: Core & HTML, defect)

1.7 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: grig, Unassigned)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.6) Gecko/20050318 Firefox/1.0.2 offsetWidth and offsetHeight attribute values for the inline elements are calculated wrong if they wrap the block-level ones. Reproducible: Always Steps to Reproduce: Using the example below: <span onclick="alert(this.offsetHeight + ',' + this.offsetWidth)"> <table cellspacing=0 cellpadding=0> <tr> <td>Content</td> </tr> </table> </span> Click on content and see that offsetHeight and offsetWidth are zero, this is wrong. Actual Results: 0,0 Expected Results: the real width and height values
Keywords: css1, css2, dom0, dom1, dom2
I suspect this is invalid, per bug 187179, bug 238592, and others. Waiting to verify.
Assignee: firefox → general
Component: General → DOM: Mozilla Extensions
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.7 Branch
Yep, this is invalid. Put a border on the inline to see what size it is.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
if you mean the definition of style="border: solid black 1px" for the SPAN then confirm - I did it and got the corresponding look: SPAN had zero-width and the content looked as if it was unwrapped by the SPAN at all.
Right. And the offset* properties correspond to the size of the span.
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.