RCFilters UI: Limit filter popup height
authorMoriel Schottlender <moriel@gmail.com>
Fri, 24 Feb 2017 21:31:19 +0000 (13:31 -0800)
committerMoriel Schottlender <moriel@gmail.com>
Sat, 25 Feb 2017 00:04:41 +0000 (16:04 -0800)
Make sure the popup clips itself after it changes height
after filtering results on search.

Bug: T158118
Change-Id: I2f9e8b775b154635aa8b12f44876279173548b99

resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js

index bdc94b3..da6fa46 100644 (file)
@@ -8,6 +8,10 @@
                // on the inline style of the popup
                margin-top: 2.4em !important;
                max-width: 650px;
+
+               .oo-ui-popupWidget-body {
+                       max-height: 70vh;
+               }
        }
 
        &-search {
index d46bd4b..9fa58f3 100644 (file)
@@ -73,6 +73,7 @@
        mw.rcfilters.ui.FilterWrapperWidget.prototype.onTextInputChange = function ( newValue ) {
                // Filter the results
                this.filterPopup.filter( this.model.findMatches( newValue ) );
+               this.capsule.popup.clip();
        };
 
        /**