Closed
Bug 1117058
Opened 11 years ago
Closed 11 years ago
clientWidth of simple rendered span element is zero
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
INVALID
People
(Reporter: yuri, Unassigned)
Details
Attachments
(1 file)
|
427 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Steps to reproduce:
1. Run the attached html
2. Press the button
3. Observe it showing width=0
Comment 1•11 years ago
|
||
Other browsers behave the same way, and the W3C (can't find a whatwg one for clientwidth) spec says:
> If the element has no associated CSS layout box or if the CSS layout box is inline, return zero.
AFAICT this is correct, so I'm marking this as invalid.
If you need the width of inline elements, use getBoundingClientRect instead.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Component: Untriaged → DOM: CSS Object Model
OS: FreeBSD → All
Product: Firefox → Core
Hardware: x86_64 → All
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•