mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
fix(combo-box): prevent default when pressing "Enter," "ArrowDown," or "ArrowUp"
This commit is contained in:
parent
740c8e1596
commit
d66dc57233
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