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

Fix focus on single selection #1965

Merged
merged 8 commits into from
May 30, 2019
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
- Update `caniuse-lite` version resolution ([#1970](https://github.com/elastic/eui/pull/1970))
- Add a webpack directive for naming icon chunks ([#1944])(https://github.com/elastic/eui/pull/1944))

**Bug fixes**

- Fix focus on single selection ([#1965](https://github.com/elastic/eui/pull/1965))
PhilippBaranovskiy marked this conversation as resolved.
Show resolved Hide resolved

## [`11.2.1`](https://github.com/elastic/eui/tree/v11.2.1)

**Bug fixes**
Expand Down
12 changes: 5 additions & 7 deletions src/components/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,17 +430,15 @@ export class EuiComboBox extends Component {
);

this.clearSearchValue();

if (singleSelection) {
this.closeList();
this.searchInput.blur();
return;
}

this.clearActiveOption();

if (!isContainerBlur) {
this.searchInput.focus();
}

if (singleSelection) {
this.closeList();
}
};

onRemoveOption = removedOption => {
Expand Down