Skip to content

Commit c667cff

Browse files
committed
Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox.
1 parent 40135bb commit c667cff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.position.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ $.fn.position = function( options ) {
122122
}
123123

124124
// prevent fractions (see #5280)
125-
position.left = parseInt( position.left );
126-
position.top = parseInt( position.top );
125+
position.left = Math.round( position.left );
126+
position.top = Math.round( position.top );
127127

128128
collisionPosition = {
129129
left: position.left - marginLeft,

0 commit comments

Comments
 (0)