Tag editor loses all inputs when you try to add a tag that already exists
Summary
When you add a tag that already exists the user will lose all the input he has made before. That includes all the file uploads. The files that were uploaded are still accessible if you copied the links before.
Steps to reproduce
- navigate to your tags or click "+" in the repository view; there click "New tag"
- add a tag 'foo' (type 'foo' next to 'Tag name')
- click 'Create tag'
- navigate to your tags or click "+" in the repository view; there click "New tag"
- add a tag 'foo' (type 'foo' next to 'Tag name')
- enter some text in 'Message' and/or 'Release Notes'
- click on 'Attach a file' to upload a file (you may want to copy the filepath)
- click 'Create tag'
What is the current bug behavior?
You will get the message that the tag 'foo' already exists. That's ok but all your inputs will be gone. In addition to this you can't use the release notes editor anymore. All the controls don't work anymore (including the 'Attach a file' "button").
The user has to navigate away from this website to add a new tag. The user also has to re-upload the file which creates a new copy of the file on the server.
What is the expected correct behavior?
The inputs of the user should be restored. Or one could implement a check on the tag name while the user is entering the name. That would help as well.
Output of checks
This bug happens on GitLab.com
Workaround
One can simply use the back button of the webbrowser.