Mirror of https://github.com/improsocial/impro An extensible Bluesky client for web impro.social
5

Configure Feed

Select the types of activity you want to include in your feed.

Autofocus login input

Grace Kind (Jul 18, 2026, 3:23 PM -0500) 7016c495 9057bdf3

+20 -6
+1 -1
package.json
··· 1 1 { 2 2 "name": "impro", 3 - "version": "0.18.2", 3 + "version": "0.18.3", 4 4 "type": "module", 5 5 "scripts": { 6 6 "start": "rm -rf \"${BUILD_DIR:-build}\" && NODE_ENV=development eleventy --serve",
+18 -5
src/js/views/login.view.js
··· 162 162 } 163 163 } 164 164 165 - function handleUseAnotherAccount() { 166 - if (state.$pendingAccountDid.get() !== null) return; 167 - state.$forceShowForm.set(true); 165 + function focusHandleInput({ clearValue = false } = {}) { 168 166 requestAnimationFrame(() => { 169 167 requestAnimationFrame(() => { 170 168 const input = root.querySelector('input[name="handle"]'); 171 169 if (input) { 172 - input.value = ""; 170 + if (clearValue) { 171 + input.value = ""; 172 + } 173 173 input.focus(); 174 174 } 175 175 }); 176 176 }); 177 + } 178 + 179 + function handleUseAnotherAccount() { 180 + if (state.$pendingAccountDid.get() !== null) return; 181 + state.$forceShowForm.set(true); 182 + focusHandleInput({ clearValue: true }); 177 183 } 178 184 179 185 function handleBack() { ··· 497 503 if (params.get("addAccount") === "1") { 498 504 state.$forceShowForm.set(true); 499 505 } 500 - loadSavedAccounts(); 506 + await loadSavedAccounts(); 507 + const listVisible = 508 + !state.$forceShowForm.get() && 509 + supportsMultipleAccounts && 510 + state.$savedAccounts.get().length > 0; 511 + if (!listVisible) { 512 + focusHandleInput(); 513 + } 501 514 }); 502 515 503 516 // Account actions navigate away with the pending spinner showing; if the
+1
tests/e2e/specs/views/login.view.test.js
··· 20 20 "placeholder", 21 21 "example.bsky.social", 22 22 ); 23 + await expect(handleInput).toBeFocused(); 23 24 24 25 await expect(page.getByRole("button", { name: "Next" })).toBeVisible(); 25 26 await expect(page.getByRole("button", { name: "Back" })).toBeVisible();