diff options
| author | 2025-05-06 08:06:52 +0000 | |
|---|---|---|
| committer | 2025-05-06 08:06:52 +0000 | |
| commit | 4a6b3575013278aca47cd1084458091b4055d2d1 (patch) | |
| tree | 672b61dc617c0b88bd162f593daa1ce6fdf9d697 /web/source/settings/components/form/inputs.tsx | |
| parent | [chore] fix testrig with new otel setup (#4135) (diff) | |
| download | gotosocial-4a6b3575013278aca47cd1084458091b4055d2d1.tar.xz | |
[bugfix] Fixes to tablist, fileinput, checkbox (#4139)
Some fixes to various frontend things:
- Fix signup checkbox being height 0 on webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4136
- Fix wonky file input on chrome and webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4138
- Make tablist in interaction policies keyboard accessible with proper left/right + focus handling, see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tablist_role
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4139
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'web/source/settings/components/form/inputs.tsx')
| -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" |
