feat(KB-219): auto-focus description textarea in NewTaskModal

- Add auto-focus to description textarea when NewTaskModal opens\n- Add test to verify textarea receives focus on modal open\n- Focus management improves UX by allowing immediate typing
This commit is contained in:
gsxdsm
2026-03-30 18:13:10 -07:00
parent ffe42cbb6c
commit 597acd6261
2 changed files with 20 additions and 0 deletions

View File

@@ -65,6 +65,15 @@ describe("NewTaskModal", () => {
expect(screen.getByRole("button", { name: "Cancel" })).toBeTruthy();
});
it("focuses description textarea when modal opens", async () => {
renderNewTaskModal();
const descTextarea = screen.getByLabelText(/Description/i);
await waitFor(() => {
expect(descTextarea).toHaveFocus();
});
});
it("creates task with description on submit", async () => {
const { props } = renderNewTaskModal();