Skip to content

Commit 0675040

Browse files
authored
feat: auth form username autofocus (#1632)
1 parent fdf72af commit 0675040

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/unfold/forms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def __init__(
9797
) -> None:
9898
super().__init__(request, *args, **kwargs)
9999

100+
self.fields["username"].widget.attrs["autofocus"] = ""
101+
100102
self.fields["username"].widget.attrs["class"] = " ".join(BASE_INPUT_CLASSES)
101103
self.fields["password"].widget.attrs["class"] = " ".join(BASE_INPUT_CLASSES)
102104

0 commit comments

Comments
 (0)