mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(combo-box): prevent default behavior when pressing Enter/ArrowUp/ArrowDown (#1472)
This commit is contained in:
parent
7030300186
commit
1a7f750093
1 changed files with 5 additions and 1 deletions
|
@ -284,7 +284,11 @@
|
|||
}
|
||||
}}"
|
||||
on:keydown
|
||||
on:keydown|stopPropagation="{({ key }) => {
|
||||
on:keydown|stopPropagation="{(e) => {
|
||||
const { key } = e;
|
||||
if (['Enter', 'ArrowDown', 'ArrowUp'].includes(key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (key === 'Enter') {
|
||||
open = !open;
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue