build: Update eslint-config-wikimedia to 0.10.0
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.FilterTagMultiselectWidget.js
index 6c2fda7..d0cc117 100644 (file)
                                }
                        );
 
-                       this.saveQueryButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } );
+                       this.saveQueryButton.$element.on( 'mousedown', function ( e ) {
+                               e.stopPropagation();
+                       } );
 
                        this.saveQueryButton.connect( this, {
                                click: 'onSaveQueryButtonClick',
                        this.queriesModel.connect( this, {
                                itemUpdate: 'onSavedQueriesItemUpdate',
                                initialize: 'onSavedQueriesInitialize',
-                               'default': 'reevaluateResetRestoreState'
+                               default: 'reevaluateResetRestoreState'
                        } );
                }
 
                this.hideShowButton.connect( this, { click: 'onHideShowButtonClick' } );
                // Stop propagation for mousedown, so that the widget doesn't
                // trigger the focus on the input and scrolls up when we click the reset button
-               this.resetButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } );
-               this.hideShowButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } );
+               this.resetButton.$element.on( 'mousedown', function ( e ) {
+                       e.stopPropagation();
+               } );
+               this.hideShowButton.$element.on( 'mousedown', function ( e ) {
+                       e.stopPropagation();
+               } );
                this.model.connect( this, {
                        initialize: 'onModelInitialize',
                        update: 'onModelUpdate',
                                // If there are no selected items, scroll menu to top
                                // This has to be in a setTimeout so the menu has time
                                // to be positioned and fixed
-                               setTimeout( function () { this.getMenu().scrollToTop(); }.bind( this ), 0 );
+                               setTimeout(
+                                       function () {
+                                               this.getMenu().scrollToTop();
+                                       }.bind( this )
+                               );
                        }
                } else {
-                       this.blur();
-
                        // Clear selection
                        this.selectTag( null );
 
 
                        // Log filter grouping
                        this.controller.trackFilterGroupings( 'filtermenu' );
+
+                       this.blur();
                }
 
                this.input.setIcon( isVisible ? 'search' : 'menu' );
                                )
                        )
                ) {
+                       // eslint-disable-next-line jquery/no-animate
                        $( container ).animate( {
                                scrollTop: newScrollTop
                        } );