your personal website on atproto - mirror blento.app

Merge pull request #132 from ptdewey/fix-login-error-131

fix: login error when pressing enter

authored by

Florian and committed by
GitHub
eb1f860b 90df684f

+5 -2
+5 -2
src/lib/atproto/UI/HandleInput.svelte
··· 38 38 (val) => { 39 39 const profile = results.find((v) => v.handle === val); 40 40 if (profile) onselected?.(profile); 41 - 42 - value = val; 41 + // Only update if val has content - prevents Combobox from clearing on Enter 42 + if (val) value = val; 43 43 } 44 44 } 45 45 bind:open={ ··· 56 56 oninput={(e) => { 57 57 value = e.currentTarget.value; 58 58 search(e.currentTarget.value); 59 + }} 60 + onkeydown={(e) => { 61 + if (e.key === 'Enter') e.currentTarget.form?.requestSubmit(); 59 62 }} 60 63 class="focus-within:outline-accent-600 dark:focus-within:outline-accent-500 dark:placeholder:text-base-400 w-full touch-none rounded-full border-0 bg-white ring-0 outline-1 -outline-offset-1 outline-gray-300 focus-within:outline-2 focus-within:-outline-offset-2 dark:bg-white/5 dark:outline-white/10" 61 64 placeholder="handle"