Skip to main content

Bug Tracker

Side navigation

#10689 closed bug (invalid)

Opened November 05, 2011 09:52PM UTC

Closed November 05, 2011 09:57PM UTC

images not in dom report 0 width/height

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: css Version: 1.7
Keywords: Cc:
Blocked by: Blocking:
Description

I have an image not in the DOM. $img.width() === 0. $img[0].width ===7680

Attachments (0)
Change History (2)

Changed November 05, 2011 09:54PM UTC by anonymous comment:1

very quick demo: http://jsfiddle.net/FYsuc/

Changed November 05, 2011 09:57PM UTC by timmywil comment:2

component: unfiledcss
priority: undecidedlow
resolution: → invalid
status: newclosed
version: → 1.7

$img.width() gets computed styles. $img[0].width retrieves the uncomputed property value. Computed width should always be 0 on disconnected images.