Skip to content

Commit

Permalink
Resolve issue with Firefox not selecting choices via enter key
Browse files Browse the repository at this point in the history
  • Loading branch information
jshjohnson committed Oct 30, 2018
1 parent bd44abb commit 7e4347b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scripts/choices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,6 @@ class Choices {
}

if (hasActiveDropdown) {
event.preventDefault();
const highlighted = this.dropdown.getChild(
`.${this.config.classNames.highlightedState}`,
);
Expand All @@ -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();
Expand Down

0 comments on commit 7e4347b

Please sign in to comment.