Fix filtering bug where it wouldn't take the selected item into account.
After selecting an item, the menu disappears. Then if we refocus on the EditableCombobox we expect the filtering to be based on the selected item. Before this CL it would still be based on the last thing we typed (a substring of the selected item), so it could show more items than necessary. This CL fixes the issue, adds a unit test, and refactors a little bit. It moves the ShowDropDownMenu call out of HandleNewContent, which is called inside OnItemSelected to fix the bug. Bug: 923660 Change-Id: Iaf6a713763d9d5dd5b2c96186fe2ea0898eec978 Reviewed-on: https://chromium-review.googlesource.com/c/1493516Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Edin Kadric <edinkadric@google.com> Cr-Commit-Position: refs/heads/master@{#636826}
Showing
Please register or sign in to comment