worldcubeassociation.org
worldcubeassociation.org copied to clipboard
Create cloned competition button disabled after cancelling alert
Describe the bug When cloning a competition, if you click create but then hit cancel on the alert, the create button is now disabled and you're unable to create the cloned competition - you need to exit, hit clone again, and re-input all the changed information from scratch (even though it's still there on the page; you just can't submit it).
To Reproduce Steps to reproduce the behavior:
- Go to any existing competition as a delegate
- Click on Clone in the left menu
- Fill out all (required) fields
- Scroll down to the bottom and click Create Competition
- See alert that changes won't be saved
- Click 'Cancel' on the alert
- Observe that Create Competition button is now disabled
Expected behavior Selecting cancel on the alert should not disable the button.
Or maybe there should be no alert at all. It's misleading to alert people that changes won't be saved, since they will be saved into the new competition.
Screenshots
Desktop (please complete the following information):
- OS: Linux
- Browser: Chrome
Hmm... This looks like a JavaScript quirk; I'm no expert on that topic :( Anybody else feel free to pick this up if you know about site alerts!
Just some background: This is an old bug. It also happens when normally creating a competition or updating a competition and cancelling- the confirm button will disable. Way back when I brought this up it seemed like I was the only one having this issue and I had a work around by inspecting the button element and removing the disabled flag which allowed me to click it and proceed as normal