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-10-21 23:25:42 -04:00
parent 19f9c3a559
commit 32264f7ad1

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,