Side navigation
#11311 closed bug (fixed)
Opened February 08, 2012 11:59PM UTC
Closed May 25, 2012 01:42AM UTC
Last modified June 12, 2012 12:56AM UTC
IE8 css 'bottom' returning incorrect value
Reported by: | whitney.a.beck@gmail.com | Owned by: | mikesherov |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | css | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$(...).css('bottom') will return the correct css attribute percent in Chrome and pixel offset in Firefox. However, in IE8 it returns a completely unrelated value. When that same value is passed back in via $(...).css('bottom', x); The attribute is changed, which as the result of the query, should not.
$(...)[0].style.bottom returns the equivalent same value as $(...).css('bottom') in Fx and Chrome, in IE the $(...)[0].style.bottom will return the correct value, where the alternative returns something completely, from all the poking I did, unrelated.
Attachments (0)
Change History (10)
Changed February 09, 2012 08:07AM UTC by comment:1
owner: | → whitney.a.beck@gmail.com |
---|---|
status: | new → pending |
Changed February 10, 2012 05:26PM UTC by comment:2
_comment0: | I'm really not sure jquery wants to fix this. I've tried a four or five different messages now, but they're all flagged as spam. I don't even get a captcha to prove I'm no robot. I've even tried just the jsFiddle link. \ \ http://jsfiddle.net/2Qrwp/ → 1328894889960772 |
---|
Finally, trac let me post. Been trying to not be auto flagged as spam for about fifteen minutes. I wasn't even getting captcha prompts.
Anyway, here's the test case. Contains both log output showing the incorrect values, as well as a timeout trigger visually showing the issue. Sorry it took so long, jsFiddle has had save disabled for about a day or so while they migrated to a cloud service.
Changed February 25, 2012 08:12AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Changed February 25, 2012 05:03PM UTC by comment:4
... I replied. What gives trac-o-bot? Is it because I posted the original ticket before I had a user account?
Changed February 26, 2012 03:55AM UTC by comment:5
resolution: | invalid |
---|---|
status: | closed → reopened |
Yes, that's what happened.
Changed February 27, 2012 02:23PM UTC by comment:6
component: | unfiled → css |
---|---|
priority: | undecided → low |
status: | reopened → open |
Confirmed in IE8. It returns just a few pixels.
Webkit returns percent, while Firefox/IE9/Opera returns pixels.
Changed March 17, 2012 09:51PM UTC by comment:7
By the way, I've been working on getting webkit to return pixels: https://bugs.webkit.org/show_bug.cgi?id=29084 no idea about IE8's problem though.
Changed March 17, 2012 10:30PM UTC by comment:8
owner: | whitney.a.beck@gmail.com → mikesherov |
---|---|
status: | open → assigned |
This is actually a bug in "Dean Edwards Awesome Hack". Not sure if I can get IE8 to return the correct pixel value, but I can get it to return the right percent value, as IE8's currentStyle natively returns percentages like webkit.
Changed May 25, 2012 01:42AM UTC by comment:9
resolution: | → fixed |
---|---|
status: | assigned → closed |
Fix #11311. Percents not pixels for top/left/bottom/right. Closes gh-793.
Changeset: d5e5ce5bd006ae94e9d85949b4f7141642cebf81
Changed June 12, 2012 12:56AM UTC by comment:10
#8158 is a duplicate of this ticket.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.