Skip to content

Commit

Permalink
Position: Properly handle flip collision when the window is scrolled.…
Browse files Browse the repository at this point in the history
… Fixes #8481 - Position in flip mode does not take into consideration scrollTop and scrollLeft.
  • Loading branch information
scottgonzalez committed Aug 17, 2012
1 parent af67883 commit 6514607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.position.js
Expand Up @@ -360,7 +360,7 @@ $.ui.position = {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? 0 : within.offset.left,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
Expand Down Expand Up @@ -395,7 +395,7 @@ $.ui.position = {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? 0 : within.offset.top,
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
Expand Down

0 comments on commit 6514607

Please sign in to comment.