Side navigation
#12352 closed bug (duplicate)
Opened August 20, 2012 02:22PM UTC
Closed August 20, 2012 06:00PM UTC
$.fn.css() return values don't match across browsers
Reported by: | avaly2 | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | offset | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery version: 1.8.0
Browsers: Chrome 21.0.1180.79, Firefox 14.0.1
OS: Windows 7
Steps to reproduce:
1. Create an absolute positioned element with the left
property set to a percentage value (L) and a transform
property set to translate
or translate3d
with any value for the x-axis defined (X)
2. Query jQuery for the left property: jQuery(element).css('left')
Expected values:
- Value equal to L (either in percentage or converted to pixels)
Actual values:
- Chrome 21 reports L + X
Value is returned by .offset()
which is used in webkit.
- Firefox 14 reports L
Test case: http://jsfiddle.net/avaly/MFtDr/10/
Test case from description uses
translate3d
.Test case with
translate
: http://jsfiddle.net/avaly/MFtDr/11/