mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
fix(date-picker): input should not lose focus when pressing "Enter" (#958)
Fixes #876
This commit is contained in:
parent
9698625b15
commit
f955b09c09
1 changed files with 8 additions and 0 deletions
|
@ -239,6 +239,14 @@
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
calendar.close();
|
calendar.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
$hasCalendar &&
|
||||||
|
/INPUT/.test(document.activeElement?.tagName) &&
|
||||||
|
e.key === 'Enter'
|
||||||
|
) {
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
}}"
|
}}"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue