From: Thomas Meyer Date: Wed, 4 Sep 2013 16:54:07 +0000 (+0200) Subject: Position: Restore old flip collision handling X-Git-Tag: 1.12.0-beta.1~466 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ebaaca7206cae201ec069dbaed85bc8d6beeab32;p=jquery-ui.git Position: Restore old flip collision handling This reverts commit 7f808b2047725cd8fde51a948cb4e5f5946c82e1. Fixes #8710 Ref gh-1071 --- diff --git a/ui/position.js b/ui/position.js index 884de240d..41e5b6432 100644 --- a/ui/position.js +++ b/ui/position.js @@ -455,12 +455,12 @@ $.ui.position = { newOverBottom; if ( overTop < 0 ) { 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; } } else if ( overBottom > 0 ) { 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; } }