Skip to main content

Bug Tracker

Side navigation

#7395 closed bug (fixed)

Opened November 04, 2010 02:36AM UTC

Closed November 10, 2010 04:29AM UTC

css() and the dimensions functions broken

Reported by: jitter Owned by: john
Priority: blocker Milestone: 1.4.4
Component: css Version: 1.4.4rc
Keywords: Cc:
Blocked by: Blocking:
Description

The dimensions functions and the css() function (atleast for width, height) are broken for the jQuery GIT (aka WIP) version.

This happens (for me) in Opera, FF, Chrome (I guess IE, Safari won't be any different).

It happens for divs which are empty/non empty unstyled or only either width or height` are explicitly set. And it gets worse for display:none elements.

The test case. Don't forget to try different scenarios like including parts of the commented out css or the commented out <p> and rerun the test (you can also throw in some margin, padding, border-width settings to see variations of the bug)

Especially that the return values for width() and height() are sometimes non numeric is problematic (it defeats the documented purpose to use them when doing mathematical calculations)

Also in Opera the breakage is normally worse than in FF or Chrome, where at least some cases seem to work.

Attachments (0)
Change History (5)

Changed November 04, 2010 03:16AM UTC by snover comment:1

component: unfiledcss
milestone: 1.51.4.4
priority: undecidedblocker
status: newopen

Changed November 05, 2010 07:09PM UTC by rwaldron comment:2

#7419 is a duplicate of this ticket.

Changed November 06, 2010 01:11AM UTC by Xotic750 comment:3

IMHO I don't think #7419 is a duplicate of this case, they are related by the fact that they both concern CSS height and width. Other than that they seem very seperate cases and are reported about different versions (1.4.3 vs 1.4.4rc).

Changed November 08, 2010 10:45PM UTC by john comment:4

owner: → john
status: openassigned

Changed November 10, 2010 04:29AM UTC by jeresig comment:5

resolution: → fixed
status: assignedclosed

Maintain returning 0px from width/height for disconnected nodes for backwards compat, for now. Fixes #7395.

Changeset: 3394d32ea75cffb8c8c386d607823cae878b9145