diff options
author | kborchers <k_borchers@yahoo.com> | 2011-09-16 11:52:22 -0500 |
---|---|---|
committer | kborchers <k_borchers@yahoo.com> | 2011-09-16 11:52:22 -0500 |
commit | 7f808b2047725cd8fde51a948cb4e5f5946c82e1 (patch) | |
tree | f7a92bfed69d41ce23404e4eb1dd3717257c14e9 /ui/jquery.ui.position.js | |
parent | 8274f081e08b6e9dd69686ced17c4413dcc044c6 (diff) | |
download | jquery-ui-7f808b2047725cd8fde51a948cb4e5f5946c82e1.tar.gz jquery-ui-7f808b2047725cd8fde51a948cb4e5f5946c82e1.zip |
Position: Check to also make sure to only flip if more of the element is inside "within"
Diffstat (limited to 'ui/jquery.ui.position.js')
-rw-r--r-- | ui/jquery.ui.position.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index 24a033fc2..74530b948 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -376,7 +376,7 @@ $.ui.position = { newOverBottom; if ( overTop < 0 ) { newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; - if ( newOverBottom < 0 || newOverBottom < Math.abs( overTop ) ) { + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < Math.abs( overTop ) ) ) { data.elem .addClass( "ui-flipped-bottom" ); @@ -385,7 +385,7 @@ $.ui.position = { } else if ( overBottom > 0 ) { newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - withinOffset; - if ( newOverTop > 0 || Math.abs( newOverTop ) < overBottom ) { + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || Math.abs( newOverTop ) < overBottom ) ) { data.elem .addClass( "ui-flipped-top" ); |