Skip to content

Commit bb2e36b

Browse files
committed
Merge remote-tracking branch 'main' into fix-tab-direction-keys
2 parents c63d530 + 00225b6 commit bb2e36b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/scripts/choices.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,15 +1611,15 @@ class Choices {
16111611
event.key === 'Unidentified';
16121612

16131613
/*
1614-
We do not show the dropdown if the keycode was tab or esc
1615-
as these one are used to focusOut of e.g. select choices.
1614+
We do not show the dropdown if focusing out with esc or navigating through input fields.
16161615
An activated search can still be opened with any other key.
16171616
*/
16181617
if (
16191618
!this._isTextElement &&
16201619
!hasActiveDropdown &&
16211620
keyCode !== KeyCodeMap.ESC_KEY &&
1622-
keyCode !== KeyCodeMap.TAB_KEY
1621+
keyCode !== KeyCodeMap.TAB_KEY &&
1622+
keyCode !== KeyCodeMap.SHIFT_KEY
16231623
) {
16241624
this.showDropdown();
16251625

src/scripts/interfaces/keycode-map.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const KeyCodeMap = {
22
TAB_KEY: 9,
3+
SHIFT_KEY: 16,
34
BACK_KEY: 46,
45
DELETE_KEY: 8,
56
ENTER_KEY: 13,

0 commit comments

Comments
 (0)