Skip to content

Commit

Permalink
fix #313 Instant search not working in dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
neexite committed Feb 2, 2017
1 parent 78e263b commit 809f86b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ SelectorBinding.prototype.buildPopup = function () {
popupBinding.addActionListener ( PopupBinding.ACTION_SHOW, this );
popupBinding.addActionListener ( MenuItemBinding.ACTION_COMMAND, this );
popupBinding.addActionListener ( PopupBinding.ACTION_HIDE, this );
this._buttonBinding.setPopup ( popupBinding );
this._buttonBinding.setPopup(popupBinding);

this._popupBinding.isManaged = true;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ function PopupBinding () {
*/
this.hasImages = true;

/**
* @type {boolean}
*/
this.isManaged = false;


/*
* Returnable.
*/
Expand Down Expand Up @@ -468,9 +474,12 @@ PopupBinding.prototype.show = function () {

if ( this._bodyBinding instanceof MenuBodyBinding ) {
this._bodyBinding.refreshMenuGroups();
this._bodyBinding.grabKeyboard();
this._bodyBinding.bindingElement.tabIndex = "-1";
this._bodyBinding.bindingElement.focus();

if (!this.isManaged) {
this._bodyBinding.grabKeyboard();
this._bodyBinding.bindingElement.tabIndex = "-1";
this._bodyBinding.bindingElement.focus();
}
}

/**
Expand Down

0 comments on commit 809f86b

Please sign in to comment.