From 7254bbda5bdf3a7ced87a1f9257505c5a3a0ad5e Mon Sep 17 00:00:00 2001 From: JensRoland Date: Wed, 4 Jul 2012 19:30:24 +0300 Subject: [PATCH] If the target element is fixed to the viewport, any element positioned adjacently must be the same --- ui/jquery.ui.position.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index 2802b2ce0d8..070e546fa28 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -210,6 +210,8 @@ $.fn.position = function( options ) { marginLeft: marginLeft, marginTop: marginTop }; + + if (target.css('position')=='fixed') elem.css('position','fixed'); $.each( [ "left", "top" ], function( i, dir ) { if ( $.ui.position[ collision[ i ] ] ) {