Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:1 Changed 3 years ago by snover
- Priority changed from undecided to blocker
- Status changed from new to open
- Component changed from unfiled to css
- Milestone changed from 1.5 to 1.4.4
comment:3 Changed 3 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:5 Changed 3 years ago by jeresig
- Status changed from assigned to closed
- Resolution set to fixed
Maintain returning 0px from width/height for disconnected nodes for backwards compat, for now. Fixes #7395.
Changeset: 3394d32ea75cffb8c8c386d607823cae878b9145
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
