OOUI: Backport I407b0d6fe7b81465054b640d4b5ac4bf352a9901
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Nov 2018 20:12:12 +0000 (21:12 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Nov 2018 20:12:12 +0000 (21:12 +0100)
Bug: T208595
Change-Id: I480067d9897dde25e89058a4da6b065de11b9b31

resources/lib/ooui/oojs-ui-core.js

index aea7f5e..5768be2 100644 (file)
@@ -4450,11 +4450,6 @@ OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positionin
        if ( this.positioning !== positioning ) {
                this.positioning = positioning;
 
-               this.needsCustomPosition =
-                       this.verticalPosition !== 'below' ||
-                       this.horizontalPosition !== 'start' ||
-                       !OO.ui.contains( this.$floatableContainer[ 0 ], this.$floatable[ 0 ] );
-
                closestScrollableOfContainer = OO.ui.Element.static.getClosestScrollableContainer( this.$floatableContainer[ 0 ] );
                // If the scrollable is the root, we have to listen to scroll events
                // on the window because of browser inconsistencies.
@@ -4593,10 +4588,6 @@ OO.ui.mixin.FloatableElement.prototype.position = function () {
                this.$floatable.removeClass( 'oo-ui-element-hidden' );
        }
 
-       if ( !this.needsCustomPosition ) {
-               return this;
-       }
-
        this.$floatable.css( this.computePosition() );
 
        // We updated the position, so re-evaluate the clipping state.