Skip to main content

Bug Tracker

Side navigation

#8567 closed bug (wontfix)

Opened March 19, 2011 06:46AM UTC

Closed March 21, 2011 03:46AM UTC

Last modified March 23, 2011 02:49PM UTC

position() rounds off the values under WebKit

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: css Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:
Description

I have an element with absolute positioning. The Chrome element inspector is showing that its X-axis position is 10.1px, like it's supposed to be, but the value that I get from position() is always rounded to the nearest integer. Affected browsers:

Chrome 10.0.648.151

Safari 5.0.4

The same code on Firefox 3.6.15 returns floating-point numbers. This might be a WebKit bug.

Attachments (0)
Change History (3)

Changed March 19, 2011 02:55PM UTC by mbaranczak@gmail.com comment:1

I forgot - here's a test case to demonstrate this behavior:

http://media.pocketgorilla.com/position.html

If anybody is reading this who has Opera or IE, would you mind posting the results?

Changed March 21, 2011 03:46AM UTC by rwaldron comment:2

component: unfiledcss
priority: undecidedlow
resolution: → wontfix
status: newclosed

This is expected behaviour - jQuery intentionally coerces css values into pixel integers

Changed March 23, 2011 02:49PM UTC by mbaranczak@gmail.com comment:3

If it's expected, then it should be done consistently. Like I said: in Firefox I get a float, in WebKit I get an integer.