diff options
| author | 2025-05-06 10:01:59 +0200 | |
|---|---|---|
| committer | 2025-05-06 12:06:40 +0200 | |
| commit | d0c3bd80e6a2401de2848a1e8dbb1b6d832c09ec (patch) | |
| tree | e9e350536562ede5bf4a3b59dc3ff502b7ec218a /web/source/settings/components | |
| parent | [chore] Update goreleaser (#4133) (diff) | |
| download | gotosocial-d0c3bd80e6a2401de2848a1e8dbb1b6d832c09ec.tar.xz | |
[bugfix] Fixes to tablist, fileinput, checkbox
Diffstat (limited to 'web/source/settings/components')
| -rw-r--r-- | web/source/settings/components/form/inputs.tsx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/web/source/settings/components/form/inputs.tsx b/web/source/settings/components/form/inputs.tsx index 1495e18f7..654f1a08f 100644 --- a/web/source/settings/components/form/inputs.tsx +++ b/web/source/settings/components/form/inputs.tsx @@ -122,10 +122,6 @@ export function FileInput({ label, field, ...props }: FileInputProps) { const ref = useRef<HTMLInputElement>(null); const { onChange, infoComponent } = field; const id = nanoid(); - const onClick = (e) => { - e.preventDefault(); - ref.current?.click(); - }; return ( <div className="form-field file"> @@ -133,11 +129,9 @@ export function FileInput({ label, field, ...props }: FileInputProps) { className="label-wrapper" htmlFor={id} tabIndex={0} - onClick={onClick} onKeyDown={(e) => { if (e.key === "Enter") { - e.preventDefault(); - onClick(e); + ref.current?.click(); } }} role="button" |
