mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Position: Restore old flip collision handling
This reverts commit7f808b2047
. Fixes #8710 Ref gh-1071 (cherry picked from commitebaaca7206
)
This commit is contained in:
parent
dc2b17d62f
commit
276cd5cd8c
@ -448,12 +448,12 @@ $.ui.position = {
|
|||||||
newOverBottom;
|
newOverBottom;
|
||||||
if ( overTop < 0 ) {
|
if ( overTop < 0 ) {
|
||||||
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
|
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
|
||||||
if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
|
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
|
||||||
position.top += myOffset + atOffset + offset;
|
position.top += myOffset + atOffset + offset;
|
||||||
}
|
}
|
||||||
} else if ( overBottom > 0 ) {
|
} else if ( overBottom > 0 ) {
|
||||||
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
||||||
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
|
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
|
||||||
position.top += myOffset + atOffset + offset;
|
position.top += myOffset + atOffset + offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user