Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox.

This commit is contained in:
Scott González 2010-12-01 11:23:06 -05:00
parent 40135bb091
commit c667cff22d

View File

@ -122,8 +122,8 @@ $.fn.position = function( options ) {
}
// prevent fractions (see #5280)
position.left = parseInt( position.left );
position.top = parseInt( position.top );
position.left = Math.round( position.left );
position.top = Math.round( position.top );
collisionPosition = {
left: position.left - marginLeft,