From 4e56d6463fced4b8083fb482d3a2daaf35247bd1 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 12 Dec 2019 11:54:25 -0600 Subject: [PATCH 1/2] preventDefault --- src/components/combo_box/combo_box.js | 1 + 1 file changed, 1 insertion(+) 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( From f50a014267f3e3879514cf3905d1f6a7c3d2cc5c Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 12 Dec 2019 12:10:35 -0600 Subject: [PATCH 2/2] CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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)