diff options
Diffstat (limited to 'ui/jquery.ui.position.js')
-rw-r--r-- | ui/jquery.ui.position.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index deacedbcc..3992e1c63 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -37,8 +37,7 @@ $.fn.position = function( options ) { targetWidth = target.width(); targetHeight = target.height(); basePosition = { top: 0, left: 0 }; - // TODO: use $.isWindow() in 1.9 - } else if ( targetElem.setTimeout ) { + } else if ( $.isWindow( targetElem ) ) { targetWidth = target.width(); targetHeight = target.height(); basePosition = { top: target.scrollTop(), left: target.scrollLeft() }; @@ -122,8 +121,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, |