diff --git a/src/routes/Register.svelte b/src/routes/Register.svelte index 6753f9c..5c67491 100644 --- a/src/routes/Register.svelte +++ b/src/routes/Register.svelte @@ -84,7 +84,7 @@ >
@@ -106,12 +106,15 @@ if (e.keyCode === 13) { document.getElementById('lastname')?.focus(); } + if (e.keyCode === 40) { + document.getElementById('lastname')?.focus(); + } }} type="text" autocomplete="one-time-code" id="firstname" name="firstname" - class="py-3 px-4 block w-full border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 border" + class="placeholder:text-black dark:placeholder:text-white py-3 px-4 block w-full border-gray-500 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-200 dark:text-gray-400 border" required placeholder="Vorname" bind:value={firstname} @@ -150,11 +153,23 @@
{ + console.log(e.keyCode); + if (e.keyCode === 13) { + document.getElementById('email')?.focus(); + } + if (e.keyCode === 38) { + document.getElementById('firstname')?.focus(); + } + if (e.keyCode === 40) { + document.getElementById('email')?.focus(); + } + }} autocomplete="one-time-code" type="lastname" id="lastname" name="lastname" - class="py-3 px-4 block w-full border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 border" + class="placeholder:text-black dark:placeholder:text-white py-3 px-4 block w-full border-gray-500 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-200 dark:text-gray-400 border" required placeholder="Nachname" aria-describedby="lastname-error" @@ -190,15 +205,28 @@
- +
{ + console.log(e.keyCode); + if (e.keyCode === 13) { + document.getElementById('submit')?.focus(); + } + if (e.keyCode === 38) { + document.getElementById('lastname')?.focus(); + } + if (e.keyCode === 40) { + document.getElementById('submit')?.focus(); + } + }} autocomplete="one-time-code" type="email" id="email" name="email" - class="py-3 px-4 block w-full border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 border" - required + class="placeholder:text-black dark:placeholder:text-white py-3 px-4 block w-full border-gray-500 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-200 dark:text-gray-400 border" placeholder="E-Mail (optional)" aria-describedby="lastname-error" bind:value={email} @@ -232,6 +260,7 @@
-
\ No newline at end of file +