#10639 (outerWidth(true) and css('margin') returning % instead of px in Webkit) - jQuery (original) (raw)
#10639 closed bug (fixed)
Opened November 02, 2011 06:12PM UTC
Closed December 07, 2011 01:37AM UTC
Last modified July 12, 2012 09:06PM UTC
| Reported by: | Sprenger | Owned by: | mikesherov |
|---|---|---|---|
| Priority: | high | Milestone: | 1.7.2 |
| Component: | css | Version: | 1.6.4 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
If you have a relative margin (defined in %), jQuery(element).css('margin-right') will normally return the margin value in pixels not in percentage. In Webkit, this is not the case.
The method jQuery(element).outerWidth returns in IOS5 the addition of width (pixel) and margin (percentage) which mixes two different measures.
Test file: http://www.chateau-web.ch/demo/ios5-jquery-2.html
Tested with 1.6.4 and v1.7 (git) and 1.5. (same values for all versions)
Attachments (0) Change History (16)