Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Scott González authored August 17, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  ui/jquery.ui.position.js
4  ui/jquery.ui.position.js
@@ -360,7 +360,7 @@ $.ui.position = {
360 360
 			var within = data.within,
361 361
 				withinOffset = within.offset.left + within.scrollLeft,
362 362
 				outerWidth = within.width,
363  
-				offsetLeft = within.isWindow ? 0 : within.offset.left,
  363
+				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
364 364
 				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
365 365
 				overLeft = collisionPosLeft - offsetLeft,
366 366
 				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
@@ -395,7 +395,7 @@ $.ui.position = {
395 395
 			var within = data.within,
396 396
 				withinOffset = within.offset.top + within.scrollTop,
397 397
 				outerHeight = within.height,
398  
-				offsetTop = within.isWindow ? 0 : within.offset.top,
  398
+				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
399 399
 				collisionPosTop = position.top - data.collisionPosition.marginTop,
400 400
 				overTop = collisionPosTop - offsetTop,
401 401
 				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,

0 notes on commit 6514607

Please sign in to comment.
Something went wrong with that request. Please try again.