Enter
should not open the single-select dropdown on MacOS
#1246
Labels
Enter
should not open the single-select dropdown on MacOS
#1246
Note
This is a cross operation system issue where the intended behavior works differently between two OS
choices.js chose a hybrid
windows
andmac
way and can either be considered abug
or afeature
. A possible workaround shouldbe making it configurable and leaving the normal behavior as is.
Description
Since Keyboard handling got fixed in #1230, I was made aware of this weird behavior from cross-operating-system users.
The current behavior of opening a
single-select
differs from the native<select>
and opening the options.Proposal
Add a new configuration option to disable the
Enter
key opening thesingle-select
dropdownI'd be willing to provide a PR for that @Xon
Windows: The intended behavior of the native
<select>
element on theWindows OS
**Up
orDown
to instantly switch between options (the dropdown will not open)Enter
to open the dropdown optionsUp
orDown
to choose the optionEnter
again to select the optionsMac-OS: The intended behavior of the native
<select>
element onMac OS
Enter
to instantly submit the selection)Up
orDown
to open the dropdown options and navigate through themEnter
to select itSince the library always handled opening up the dropdown on
down
andup
even on windows, this could stay as is and be seen as an enhancement.Reproduction and expected behavior
You can simply reproduce it by cross-checking the behavior of normal selects vs. the single-select
Enter
onsingle-selects
Expected behavior
The Dropdown on single-selects should not open on Enter on MacOs.
Choices version and bundle
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: