mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
fix(multi-select): ListBoxField should not prevent default keyboard behavior
Fixes #938
This commit is contained in:
parent
e827fe0a23
commit
42e9432eec
2 changed files with 6 additions and 2 deletions
|
@ -60,7 +60,7 @@
|
|||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keydown|preventDefault|stopPropagation
|
||||
on:keydown|stopPropagation
|
||||
on:focus
|
||||
on:blur
|
||||
>
|
||||
|
|
|
@ -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