Skip to main content

Bug Tracker

Side navigation

#12381 closed bug (worksforme)

Opened August 23, 2012 09:21AM UTC

Closed August 23, 2012 02:24PM UTC

,offset() may rerturn non integer values

Reported by: Alex_ironsys Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

.offset() method may return non integer values (foo.5) (found for Firefox 14 and Chrome 21, while both IE9 and Opera 10.51 work OK and return integer values)

if called on element centered using margin auto, when both left and right margins sum is a not even number.

This is jsFiddle example:

All versions of jQuery including 1.8.0 seem to act the same.

Attachments (0)
Change History (1)

Changed August 23, 2012 02:24PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

This looks right to me, I don't think jQuery should be trying to change the numbers the browser returns. If you want whole pixels you can round or truncate.