- // Scroll to the item
- if ( this.model.removeViewTriggers( oldInputValue ) ) {
- // We're binding a 'once' to the itemVisibilityChange event
- // so this happens when the menu is ready after the items
- // are visible again, in case this is done right after the
- // user filtered the results
- this.getMenu().once(
- 'itemVisibilityChange',
- function () {
- widget.scrollToTop( menuOption.$element );
- widget.menu.setUserSelecting( false );
- }
- );
- } else {
- this.scrollToTop( menuOption.$element );
- this.menu.setUserSelecting( false );
- }