Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox: multiple fixes. #674

Closed
wants to merge 11 commits into from
2 changes: 2 additions & 0 deletions Combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ define([
}
}.bind(this), 100); // worth exposing a property for the delay?
}
} else {
this.focusNode.focus(); // put the focus back to the inputNode.
Copy link
Member

@wkeese wkeese Dec 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be tested (that only passes after your change to Combobox.js). Probably just updating one of the existing tests to check focus after clicking a list item.

Actually, I loaded cwithout your changes, and tried both the first and the second Combobox on that page, and it seems like clicking a list's item already refocuses the Combobox if autoFilter===false, or the Combobox's <input> if autoFilter===true??

Also, I'm confused about what happens when:

  1. The first Combobox in Combobox-decl.html where you can't focus the <input>. What happens then?
  2. Multi-select mode. In that case don't you want to keep focus on the list item?
  3. ComboPopup. Does this code run in the ComboPopup case, and if so, doesn't focus go to the ComboPopup's <input> or the original ComboBox <input>? And what if the ComboPopup isn't showing an <input>, like the first example in ComboPopup.html?

}
}.bind(this)),

Expand Down