Merge "RCFilters UI: Display popups above CapsuleItemWidgets"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 8 Mar 2017 01:28:55 +0000 (01:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 8 Mar 2017 01:28:55 +0000 (01:28 +0000)
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js

index 05f2f66..a1cee21 100644 (file)
@@ -38,6 +38,7 @@
                        popup: {
                                padded: false,
                                align: 'center',
+                               position: 'above',
                                $content: $popupContent
                                        .append( descLabelWidget.$element ),
                                $floatableContainer: this.$element,
        mw.rcfilters.ui.CapsuleItemWidget.prototype.onMouseEnter = function () {
                if ( this.model.getDescription() ) {
                        if ( !this.positioned ) {
-                               // Recalculate position to be center of the capsule item
-                               this.popup.$element.css( 'margin-left', ( this.$element.width() / 2 ) );
+                               // Recalculate anchor position to be center of the capsule item
+                               this.popup.$anchor.css( 'margin-left', ( this.$element.width() / 2 ) );
                                this.positioned = true;
                        }