Only hide dropzone when no files have been uploaded#35156
Only hide dropzone when no files have been uploaded#35156lunny merged 6 commits intogo-gitea:mainfrom
Conversation
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
There was a problem hiding this comment.
Made some changes via GitHub online editor.
I think we do not need to tolerate "null/undefined" for this case: if ".form-field-dropzone" exists, then ".dropzone" must exists, then "el.dropzone" must exist. If any of them doesn't exist, there must be something (more serious) wrong.
|
Yeah, it's better to let the code crash than to hide bugs with |
Are there any changes that still need to be made here? |
Instead of always hiding the dropzone when it's not active: - hide it when when there are no uploaded files and it becomes inactive - don't hide it when there are uploaded files Fixes go-gitea#35125 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Backport #35156 by @bartvdbraak Instead of always hiding the dropzone when it's not active: - hide it when when there are no uploaded files and it becomes inactive - don't hide it when there are uploaded files Fixes #35125 Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* giteaofficial/main: [skip ci] Updated translations via Crowdin Fix migrate input box bug (go-gitea#35166) [skip ci] Updated translations via Crowdin Only hide dropzone when no files have been uploaded (go-gitea#35156) Change some columns from text to longtext and fix column wrong type caused by xorm (go-gitea#35141) [skip ci] Updated translations via Crowdin Add `owner` and `parent` fields clarification to docs (go-gitea#35023) Improve language in en-US locale strings (go-gitea#35124)
Instead of always hiding the dropzone when it's not active:
Fixes #35125