From 5b32e2ac03b7f23f458d404d75c3dd841f67cd43 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Mon, 9 Dec 2024 18:16:41 -0500 Subject: [PATCH] =?UTF-8?q?fix(#2355):=20correctly=20reset=20Dialog?= =?UTF-8?q?=E2=80=99s=20returnValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2355 --- umap/static/umap/js/modules/ui/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/modules/ui/dialog.js b/umap/static/umap/js/modules/ui/dialog.js index 63414098..cc7d1a1e 100644 --- a/umap/static/umap/js/modules/ui/dialog.js +++ b/umap/static/umap/js/modules/ui/dialog.js @@ -78,7 +78,6 @@ export default class Dialog extends WithTemplate { event.preventDefault() this.dialog.returnValue = 'accept' this.close() - this.dialog.returnValue = undefined }) } this.dialog.addEventListener('keydown', (e) => { @@ -143,6 +142,7 @@ export default class Dialog extends WithTemplate { close() { this.toggle(false) + this.dialog.returnValue = undefined } toggle(open = false) {