From ed45b6e54510d8dc659c550cb391d200e47fead7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Fri, 11 Nov 2022 10:40:32 -0300 Subject: [PATCH] Make dropzone accesible through tab nav --- src/lib/Counter.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/Counter.svelte b/src/lib/Counter.svelte index c090a9c..dc2d4b7 100644 --- a/src/lib/Counter.svelte +++ b/src/lib/Counter.svelte @@ -76,7 +76,9 @@ function handleOnClick(evt) { } function handleOnKeydown(evt) { - console.log(evt) + if (evt.key === "Enter") { + document.getElementById("file-input").click(); + } } @@ -88,7 +90,8 @@ function handleOnKeydown(evt) {

Upload files

Max file size is {maxFileSize/1000}kb. Accepted formats: {acceptedFiles.join(",")}.

-
+ +