Ticket #8949 (closed bug: worksforme)
.width() and .height() with css atrrbute clip in opera
| Reported by: | renem1@… | Owned by: | renem1@… |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | css | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I believe that the newest Opera version returns as value for .width() and .height() of an image only the width and height of the clip attribute when it is set in css. In Firefox and Internet Explorer the width and height of the complete image is returned. If I use .attr('width') and .attr('height') the correct values of the whole image are returned in all browsers.
Change History
comment:1 Changed 2 years ago by addyosmani
- Owner set to renem1@…
- Priority changed from undecided to low
- Status changed from new to pending
- Component changed from unfiled to manipulation
comment:2 Changed 2 years ago by renem1@…
- Status changed from pending to new
I have tried to reproduce my problem at jsFiddle.net: http://jsfiddle.net/pJgyu/9314/
As you can see the .height() function returns different values on IE, FF and Opera.
comment:3 Changed 2 years ago by timmywil
- Status changed from new to open
- Component changed from manipulation to css
Confirmed inconsistent values are returned. Updated test case
comment:4 Changed 15 months ago by mikesherov
- Status changed from open to closed
- Resolution set to worksforme
I can no longer reproduce this using timmywil's fiddle as of today. I tested this in IE8, Opera 11.6, FF10, Chrome 17. All produce the value of 400 for height.
Until there is a new repro case, I'm considering this closed.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket!
Additionally, test against the jQuery (edge) version to ensure the issue still exists.