Skip to main content

Bug Tracker

Side navigation

#1347 closed bug (invalid)

Opened July 03, 2007 10:43AM UTC

Closed July 21, 2007 02:31AM UTC

Last modified March 15, 2012 04:41PM UTC

.width() incorrect for non-displayed/hidden elements

Reported by: sidebog7 Owned by: brandon
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:
Description

I upgraded to the latest version of jQuery and all my .width() calls for hidden unordered lists came back incorrect. If the uls were set to visible then the correct value was returned.

Attached file with example. $('ul').width() returns same value as $(document).width() if the ul is hidden. When displayed it returns the correct value 21 (or similar).

Attachments (1)
  • ulWidth.html (0.8 KB) - added by sidebog7 July 03, 2007 10:46AM UTC.

    Example of error

Change History (3)

Changed July 03, 2007 10:47AM UTC by sidebog7 comment:1

On a further note. This appears to go wrong only on Firefox (so far).

Changed July 20, 2007 09:27PM UTC by brandon comment:2

owner: → brandon

Changed July 21, 2007 02:31AM UTC by brandon comment:3

resolution: → invalid
status: newclosed

Actually the width method is getting the correct value. This is a CSS issue. For example just remove the position: absolute and the values will be the same.