Skip to main content

Bug Tracker

Side navigation

#7225 closed bug (fixed)

Opened October 17, 2010 10:32AM UTC

Closed October 22, 2010 04:28AM UTC

Last modified March 19, 2012 09:21PM UTC

CSS width and height of hidden and disconnected elements is incorrect

Reported by: shikakaa@gmail.com Owned by: danheberden
Priority: blocker Milestone: 1.4.4
Component: css Version: 1.4.3
Keywords: regression Cc:
Blocked by: Blocking:
Description

Made a test case on jsfiddle.net.

http://jsfiddle.net/x9tcZ/1/

Basically, if a textarea is hidden using a display:none on a parent element, jquery 1.4.3 will return incorrect, negative css height values, instead of the explicit set correct value that jquery 1.4.2 returns

Attachments (0)
Change History (15)

Changed October 17, 2010 10:41AM UTC by anonymous comment:1

Tested in Chrome and FF 3.6.x. I don't know if it's any more general than this. The new behaviour is different than 1.4.2, this is not what I expected and I don't find it logical.

Changed October 17, 2010 08:53PM UTC by snover comment:2

_comment0: [http://jsfiddle.net/snover/x9tcZ/2/ improved test case]1287350132715705
component: unfiledcss
keywords: → regression
priority: undecidedblocker
status: newopen

Changed October 18, 2010 01:59PM UTC by addyosmani comment:3

#7235 is a duplicate of this ticket.

Changed October 21, 2010 07:16PM UTC by snover comment:4

#7265 is a duplicate of this ticket.

Changed October 21, 2010 07:17PM UTC by snover comment:5

summary: CSS height of hidden elements is incorrectCSS width and height of hidden elements is incorrect

Changed October 21, 2010 07:22PM UTC by snover comment:6

summary: CSS width and height of hidden elements is incorrectCSS width and height of hidden and disconnected elements is incorrect

Changed October 21, 2010 07:30PM UTC by snover comment:7

#7267 is a duplicate of this ticket.

Changed October 22, 2010 12:41AM UTC by snover comment:8

owner: → danheberden
status: openassigned

Changed October 22, 2010 04:28AM UTC by jeresig comment:9

resolution: → fixed
status: assignedclosed

Make sure that height/width getters work on hidden inputs and disconnected elements. Fixes #7225.

Changeset: e4a38670b10b1ce776afff389bae34991e986180

Changed October 22, 2010 06:16AM UTC by jeresig comment:10

Make sure that the correct height/width of the elements is retreived. Fixes #7225.

Changeset: 7e02cee5ff8b5e9117366d7b43af7b5794f0f258

Changed October 22, 2010 06:35AM UTC by anonymous comment:11

Sorry for easy question, but when will this fix be in stable release of Jquery ? I don't know where to get this information. Will it be 1.4.4 ? Right now, I have to 1.4.2 due to this bug, but I am very looking forward to using 1.4.3 enhancements.

Changed October 22, 2010 06:39AM UTC by jeresig comment:12

Make sure that .width()/.height() don't return NaN also standardize on returning instead of auto for default values (which is what we do elsewhere in .css() as well). Fixes #7225.

Changeset: 53396b879bd29c090824da182e3cf69158829f82

Changed November 05, 2010 04:08PM UTC by pwnedd comment:13

Still running into issues with Git version,e.g.:

1.4.3 http://jsfiddle.net/VERw5/1/

Git http://jsfiddle.net/VERw5/2/

Changed November 12, 2010 04:49PM UTC by pwnedd comment:14

Seems to be fixed in the Git now.

Changed July 20, 2011 01:12AM UTC by anonymous comment:15

Shouldn't this also be fixed for outerWidth and outerHeight?