CI Lint editor not loading appropriately after validation
Summary
CI Lint editor libraries are not properly loaded after the validation.
Steps to reproduce
- Go to https://gitlab.com/ci/lint
- Fill editor text area with any content
- Click 'validate'
- Wait until the page refreshes. After that, CI Lint editor will not work
What is the current bug behavior?
After the validation, the CI Lint editor is no longer functional:
- You can't edit the content
- 'Clear' button is not working
What is the expected correct behavior?
CI Lint editor should be functional
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
In the backend, we're responding with a render, which doesn't trigger the document.addEventListener
. A possible fix will be to:
- Call
create
through ajax - Render
_create.html.haml
content in the frontend, instead of doing a hard-reload