Commit 76f4383
authored
Fix file upload button (#824)
Fixes #612
### Description
Fixes the file upload button.
The problem is caused by `<button>` element that wraps file upload input
having no `type` attribute. When used inside a form it defaults to
`type="submit"`
([REF](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button))
which causes the page to reload (or submitting the form to the same url)
at the same time as opening the upload dialog. The upload dialog itself
does nothing in this case because it is mounted to the old page (before
reload).
<img width="975" alt="Bildschirmfoto 2024-07-28 um 19 48 31"
src="https://github.com/user-attachments/assets/d0b27bd4-bd7b-4793-ac07-c4b6c0011c9f">1 parent b15f74e commit 76f4383
File tree
1 file changed
+1
-0
lines changed1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
0 commit comments