-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Only hide dropzone when no files have been uploaded #35156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: wxiaoguang <[email protected]>
Signed-off-by: wxiaoguang <[email protected]>
Signed-off-by: wxiaoguang <[email protected]>
Signed-off-by: wxiaoguang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
* 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