Remove enter key listener on Delete Merged Branches
What does this MR do and why?
Closes #456218 (closed)
Removes ENTER key listeners for the button and the input field in app/assets/javascripts/branches/components/delete_merged_branches.vue. Instead, it adds the callback on the submit handler on the form itself, and connects the button which is outside the form with the form using the form attribute. It updates the tests and fixes an unrelated typo in the spec file.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
| Screen_Recording_2024-06-06_at_17.25.28 | Screen_Recording_2024-06-06_at_17.24.07 |
How to set up and validate locally
- Tests: Run test:
yarn jest delete_merged_branches_spec.js - In the interface
- go to any project (e.g. flightjs/Flight)
- go to Code => Branches
- click on the "..." menu on the right
- click on the button "Delete merged branches" to open the modal
- test the form by hitting 'enter' on the input field (after entering 'delete')
- repeat steps 1-5 and test the form by clicking the primary button on the input field (after entering 'delete')
Related to #456218 (closed)
Edited by Vanessa Otto