We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c313d5 commit 17c9ea8Copy full SHA for 17c9ea8
src/components/dialogs/StandardDialog.svelte
@@ -37,7 +37,7 @@
37
// Use curr so we don't call onCloseDialog() on page load.
38
if (curr && !next) {
39
onCloseDialog();
40
- } else {
+ } else if (!curr && next) {
41
onOpenDialog();
42
}
43
return next;
@@ -55,7 +55,7 @@
55
});
56
57
const keyListener = (event: KeyboardEvent) => {
58
- if (event.key === 'Escape') {
+ if (event.key === 'Escape' && isOpen) {
59
60
61
};
@@ -75,7 +75,7 @@
75
$: sync.open(isOpen, v => (isOpen = v));
76
77
let prevOpen: boolean;
78
- $: if (isOpen) {
+ $: if (!prevOpen && isOpen) {
79
80
prevOpen = isOpen;
81
} else if (prevOpen && !isOpen) {
0 commit comments