mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 16:42:25 -05:00
[bugfix] Fixes to tablist, fileinput, checkbox
This commit is contained in:
parent
ca04512689
commit
d0c3bd80e6
4 changed files with 85 additions and 45 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue