]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometim...
authorScott González <scott.gonzalez@gmail.com>
Wed, 1 Dec 2010 16:23:06 +0000 (11:23 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 1 Dec 2010 16:23:06 +0000 (11:23 -0500)
ui/jquery.ui.position.js

index deacedbcc514c070f5231747ac4524c32349ea48..9d490d2749dfc26ce180413105c049d9405b0469 100644 (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,