mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
12a06b6240
commit
4dcd88d03e
1 changed files with 7 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
let buttonRef = undefined;
|
||||
let buttonWidth = undefined;
|
||||
let menuRef = undefined;
|
||||
let didOpen = false;
|
||||
|
||||
setContext('OverflowMenu', {
|
||||
focusedId,
|
||||
|
@ -85,10 +86,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (!open) {
|
||||
if (didOpen && !open) {
|
||||
buttonRef.focus();
|
||||
items.set([]);
|
||||
currentId.set(undefined);
|
||||
currentIndex.set(0);
|
||||
}
|
||||
|
||||
if (!didOpen) {
|
||||
didOpen = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue