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

RESOLVED INVALID

Status

()

RESOLVED INVALID
14 years ago
6 years ago

People

(Reporter: grig, Unassigned)

Tracking

1.7 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
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
(Reporter)

Updated

14 years ago
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
Keywords: css1, css2, dom0, dom1, dom2
Yep, this is invalid.  Put a border on the inline to see what size it is.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

14 years ago
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
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.