fix: preserve drawer on dialog escape

This commit is contained in:
wxs
2026-07-17 13:27:41 +08:00
parent b973e1099d
commit 0f1edcd181
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ export function createFavoritesDrawer(
};
const onDocumentKeydown = (event: KeyboardEvent) => {
if (event.key !== "Escape" || !isOpen) {
if (event.key !== "Escape" || !isOpen || event.defaultPrevented) {
return;
}
if (document.querySelector("[data-sces-favorite-folder-dialog]")) {