mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(multi-select): ListBoxField should not prevent default keyboard behavior (#1101)
Fixes #938
This commit is contained in:
parent
3baa105d63
commit
73b105660c
2 changed files with 6 additions and 2 deletions
|
@ -315,10 +315,14 @@
|
|||
open = !open;
|
||||
}
|
||||
}}"
|
||||
on:keydown="{({ key }) => {
|
||||
on:keydown="{(e) => {
|
||||
if (filterable) {
|
||||
return;
|
||||
}
|
||||
const key = e.key;
|
||||
if ([' ', 'ArrowUp', 'ArrowDown'].includes(key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (key === ' ') {
|
||||
open = !open;
|
||||
} else if (key === 'Tab') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue