From 216c12ec7bb1f2175ca74148e3ecf89d46d6c6cb Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 19 Feb 2019 16:54:39 -0600 Subject: [PATCH] EuiComboBox keyboard navigation: tab exit (#1576) * only prevent tab from leaving combobox if the list is open * #1576 changelog entry --- CHANGELOG.md | 1 + src/components/combo_box/combo_box.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff507cf9710..830e9ce5ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Bug fixes** - Fixed content cut off in `EuiContextMenuPanel` when height changes dynamically ([#1559](https://github.com/elastic/eui/pull/1559)) +- Fixed `EuiComboBox` to allow keyboard tab to exit single selection box ([#1576](https://github.com/elastic/eui/pull/1576)) ## [`7.1.0`](https://github.com/elastic/eui/tree/v7.1.0) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index 02282d540d3..f9dc262cea0 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -343,7 +343,7 @@ export class EuiComboBox extends Component { case TAB: // Disallow tabbing when the user is navigating the options. - if (this.hasActiveOption()) { + if (this.hasActiveOption() && this.state.isListOpen) { e.preventDefault(); e.stopPropagation(); }