Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7395 closed bug (fixed)

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.

Change History (5)

comment:1 Changed 9 years ago by snover

Component: unfiledcss
Milestone: 1.51.4.4
Priority: undecidedblocker
Status: newopen

comment:2 Changed 9 years ago by Rick Waldron

#7419 is a duplicate of this ticket.

comment:3 Changed 9 years ago by Xotic750

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).

comment:4 Changed 9 years ago by john

Owner: set to john
Status: openassigned

comment:5 Changed 9 years ago by jeresig

Resolution: fixed
Status: assignedclosed

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

Changeset: 3394d32ea75cffb8c8c386d607823cae878b9145

Note: See TracTickets for help on using tickets.