From 461f2595b50ce7e3e716e8c88d10631a74226301 Mon Sep 17 00:00:00 2001 From: Yoonjae Choi <123538138+uniqueeest@users.noreply.github.com> Date: Tue, 30 Apr 2024 06:59:32 +0900 Subject: [PATCH] fix(web): Prevent DELETE key from clearing DateInput in modal (#8846) * fix(web): Prevent DELETE key from clearing DateInput in modal (#8804) * chore: test prettier * fix: stop propagation * fix: stop propagation in modal * fix: remove unnecessary function and revise lint issue * chore: cleanup --------- Co-authored-by: Jason Rasmussen --- .../shared-components/change-date.svelte | 66 ++++++++----------- .../full-screen-modal.svelte | 1 + web/src/lib/utils/shortcut.ts | 2 +- 3 files changed, 31 insertions(+), 38 deletions(-) diff --git a/web/src/lib/components/shared-components/change-date.svelte b/web/src/lib/components/shared-components/change-date.svelte index e87f77ae52..0e53f0b261 100644 --- a/web/src/lib/components/shared-components/change-date.svelte +++ b/web/src/lib/components/shared-components/change-date.svelte @@ -53,43 +53,35 @@ dispatch('confirm', value); } }; - - const handleKeydown = (event: KeyboardEvent) => { - if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) { - event.stopPropagation(); - } - }; -
- -
-
- - -
-
- -
+ +
+
+ +
- -
+
+ +
+
+
diff --git a/web/src/lib/components/shared-components/full-screen-modal.svelte b/web/src/lib/components/shared-components/full-screen-modal.svelte index a35a544d5b..176255ad09 100644 --- a/web/src/lib/components/shared-components/full-screen-modal.svelte +++ b/web/src/lib/components/shared-components/full-screen-modal.svelte @@ -45,6 +45,7 @@