fix(overflow-menu): focus menu button on escape key only

Fixes #268
This commit is contained in:
Eric Liu 2020-09-19 09:47:11 -07:00
commit 93da919951

View file

@ -125,7 +125,6 @@
}
if (didOpen && !open) {
buttonRef.focus();
items.set([]);
currentId.set(undefined);
currentIndex.set(0);
@ -186,6 +185,7 @@
} else if (e.key === 'Escape') {
e.stopPropagation();
open = false;
buttonRef.focus();
}
}
}}">