RCFilters: Blur the input after it is cleared
authorMoriel Schottlender <moriel@gmail.com>
Thu, 15 Nov 2018 23:47:11 +0000 (15:47 -0800)
committerMoriel Schottlender <moriel@gmail.com>
Thu, 15 Nov 2018 23:47:11 +0000 (15:47 -0800)
The TagMultiselectWidget becomes invalid if there's text left
in the input when the input is blurred; we need to make sure we
are blurring the input *after* the input was cleared.

Bug: T209657
Change-Id: Ib8b2f174729442f499425d9880f291e6430ded39

resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js

index 6c2fda7..aedef49 100644 (file)
                                setTimeout( function () { this.getMenu().scrollToTop(); }.bind( this ), 0 );
                        }
                } else {
-                       this.blur();
-
                        // Clear selection
                        this.selectTag( null );
 
 
                        // Log filter grouping
                        this.controller.trackFilterGroupings( 'filtermenu' );
+
+                       this.blur();
                }
 
                this.input.setIcon( isVisible ? 'search' : 'menu' );