your personal website on atproto - mirror blento.app

fix: login error when pressing enter #131

pdewey.com 95904236 4feffd02

verified
+6 -4
+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"
+1 -2
src/routes/(auth)/oauth/callback/+page.svelte
··· 12 12 goto('/' + getHandleOrDid(user.profile) + '/edit', {}); 13 13 } 14 14 15 - if(!user.isInitializing && !startedErrorTimer) { 15 + if (!user.isInitializing && !startedErrorTimer) { 16 16 startedErrorTimer = true; 17 17 18 18 setTimeout(() => { ··· 30 30 >There was an error signing you in, please go back to the 31 31 <a class="text-accent-600 dark:text-accent-400" href="/">homepage</a> 32 32 and try again. 33 - 34 33 </span> 35 34 </div> 36 35 {/if}