Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Position: Properly handle flip collision when the window is scrolled.…

… Fixes #8481 - Position in flip mode does not take into consideration scrollTop and scrollLeft.
  • Loading branch information...
commit 651460792b3aeb7f05cbad5dc8f7b2276bdd9b29 1 parent af67883
@scottgonzalez scottgonzalez authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.position.js
View
4 ui/jquery.ui.position.js
@@ -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,
@@ -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,
Please sign in to comment.
Something went wrong with that request. Please try again.