From: Scott González Date: Wed, 1 Dec 2010 16:23:06 +0000 (-0500) Subject: Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometim... X-Git-Tag: 1.8.7~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c667cff22d8ef352b81338e2834379678fb2dd27;p=jquery-ui.git Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox. --- diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index deacedbcc..9d490d274 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -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,