mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(tooltip): pressing "Escape" should break out of trap focus (#1015)
Fixes #924
This commit is contained in:
parent
a60bc73fea
commit
b13bb8e09f
1 changed files with 1 additions and 0 deletions
|
@ -75,6 +75,7 @@
|
|||
function onKeydown(e) {
|
||||
if (e.key === "Escape" || e.key === "Tab") {
|
||||
e.stopPropagation();
|
||||
if (e.key === "Escape") refIcon?.focus();
|
||||
open = false;
|
||||
} else if (e.key === " " || e.key === "Enter") {
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue