Skip to content
Permalink
Browse files

Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - P…

…osition: Sometimes positioning is off by 1px in Firefox.
  • Loading branch information
scottgonzalez committed Dec 1, 2010
1 parent 40135bb commit c667cff22d8ef352b81338e2834379678fb2dd27
Showing with 2 additions and 2 deletions.
  1. +2 −2 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,

2 comments on commit c667cff

@jzaefferer

This comment has been minimized.

Copy link
Member

@jzaefferer jzaefferer replied Dec 1, 2010

parseInt() was used only for "rounding", not for parsing?

@scottgonzalez

This comment has been minimized.

Copy link
Member Author

@scottgonzalez scottgonzalez replied Dec 1, 2010

yes, at this point we're always dealing with numbers.

Please sign in to comment.
You can’t perform that action at this time.