]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Restore old flip collision handling
authorThomas Meyer <meyertee@gmail.com>
Wed, 4 Sep 2013 16:54:07 +0000 (18:54 +0200)
committerScott González <scott.gonzalez@gmail.com>
Fri, 9 Jan 2015 20:09:57 +0000 (15:09 -0500)
This reverts commit 7f808b2047725cd8fde51a948cb4e5f5946c82e1.

Fixes #8710
Ref gh-1071

ui/position.js

index 884de240d85cff8e651e495891c0bc32cd44acd4..41e5b6432bbad5d79995512a57ad0700da5f90c6 100644 (file)
@@ -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;
                                }
                        }