Skip to content

Commit

Permalink
Fix #5855: Dropdown ignore ALT key when searching (#7560)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 3, 2025
1 parent a374211 commit 52118f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ export const Dropdown = React.memo(
return;
}

const metaKey = event.metaKey || event.ctrlKey;
const code = DomHandler.isAndroid() ? event.key : event.code;

switch (code) {
Expand Down Expand Up @@ -253,6 +252,9 @@ export const Dropdown = React.memo(
break;

default:
const metaKey = event.metaKey || event.ctrlKey || event.altKey;

// Only handle printable characters when no meta keys are pressed
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
!overlayVisibleState && !props.editable && show();
!props.editable && searchOptions(event, event.key);
Expand Down

0 comments on commit 52118f3

Please sign in to comment.