diff --git a/CHANGELOG.md b/CHANGELOG.md index 544c06d6ea4..c8fdfa33b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug fixes** - Removed all `lodash` imports in `eui.d.ts` to avoid namespace pollution ([#1723](https://github.com/elastic/eui/pull/1723)) +- Prevent `EuiComboBox` from creating a custom option value when user clicks on a value in the dropdown ([#1728](https://github.com/elastic/eui/pull/1728)) ## [`9.3.0`](https://github.com/elastic/eui/tree/v9.3.0) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index b6a0693d284..2efa74e7575 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -290,7 +290,7 @@ export class EuiComboBox extends Component { // If the user tabs away or changes focus to another element, take whatever input they've // typed and convert it into a pill, to prevent the combo box from looking like a text input. - if (!this.hasActiveOption() && !focusedInInput) { + if (!this.hasActiveOption() && !focusedInInput && !focusedInOptionsList) { this.addCustomOption(); } }