Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12381 closed bug (worksforme)

,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.

Change History (1)

comment:1 Changed 11 years ago by dmethvin

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.



Note: See TracTickets for help on using tickets.