refac
This commit is contained in:
1 parent
d67fe02263
commit
57a2024c58
1 file changed
+3
@@ -46,6 +46,8 @@
|
|||||||
|
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
console.log('Enter');
|
console.log('Enter');
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
confirmHandler();
|
confirmHandler();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -81,6 +83,7 @@
|
|||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
show = false;
|
show = false;
|
||||||
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
if (focusTrap) {
|
if (focusTrap) {
|
||||||
focusTrap.deactivate();
|
focusTrap.deactivate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user