Skip to content

Commit 57a2024

Browse files
committed
refac
1 parent d67fe02 commit 57a2024

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lib/components/common/ConfirmDialog.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
4747
if (event.key === 'Enter') {
4848
console.log('Enter');
49+
event.preventDefault();
50+
event.stopPropagation();
4951
confirmHandler();
5052
}
5153
};
@@ -81,6 +83,7 @@
8183
8284
onDestroy(() => {
8385
show = false;
86+
window.removeEventListener('keydown', handleKeyDown);
8487
if (focusTrap) {
8588
focusTrap.deactivate();
8689
}

0 commit comments

Comments
 (0)