From 7e4347b1839f8cf43dd3da06222e5705a7417246 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Tue, 30 Oct 2018 19:20:16 +0000 Subject: [PATCH] Resolve issue with Firefox not selecting choices via enter key --- src/scripts/choices.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/choices.js b/src/scripts/choices.js index e89a4b8..7885a75 100644 --- a/src/scripts/choices.js +++ b/src/scripts/choices.js @@ -1229,7 +1229,6 @@ class Choices { } if (hasActiveDropdown) { - event.preventDefault(); const highlighted = this.dropdown.getChild( `.${this.config.classNames.highlightedState}`, ); @@ -1242,6 +1241,8 @@ class Choices { } this._handleChoiceAction(activeItems, highlighted); } + + event.preventDefault(); } else if (this._isSelectOneElement) { // Open single select dropdown if it's not active this.showDropdown();