diff --git a/CHANGELOG.md b/CHANGELOG.md index cf6f286669f..20cacee8923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ **Bug fixes** - Fixed `EuiDroppable` not accepting multiple children when using TypeScript ([#2634](https://github.com/elastic/eui/pull/2634)) +- Fixed `EuiComboBox` from submitting parent `form` element when selecting options via `Enter` key ([#2642](https://github.com/elastic/eui/pull/2642)) ## [`17.1.2`](https://github.com/elastic/eui/tree/v17.1.2) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index 5aa2e79df2d..5a9c480a797 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -387,6 +387,7 @@ export class EuiComboBox extends Component { break; case comboBoxKeyCodes.ENTER: + e.preventDefault(); e.stopPropagation(); if (this.hasActiveOption()) { this.onAddOption(