Bug Tracker

Modify

Ticket #8567 (closed bug: wontfix)

Opened 2 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 2 years ago by mbaranczak@…

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?

comment:2 follow-up: ↓ 3 Changed 2 years ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to css

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

comment:3 in reply to: ↑ 2 Changed 2 years ago by mbaranczak@…

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.