Merge "RCFilters: Add 'advanced filters' label to the view selection"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.FilterTagMultiselectWidget.js
index 08beacd..3aa7161 100644 (file)
@@ -29,6 +29,7 @@
                this.queriesModel = savedQueriesModel;
                this.$overlay = config.$overlay || this.$element;
                this.matchingQuery = null;
+               this.currentView = this.model.getCurrentView();
 
                // Parent
                mw.rcfilters.ui.FilterTagMultiselectWidget.parent.call( this, $.extend( true, {
 
                // Update input
                this.input.setValue( inputValue );
+
+               if ( this.currentView !== view ) {
+                       this.scrollToTop( this.$element );
+                       this.currentView = view;
+               }
        };
 
        /**