Add the [Enter] shortcut to the modal window for entering duplicates issue

Issue

On the issue management page, you can mark an issue as a duplicate. In this case, a modal window for entering a URL will appear. Pressing Enter in it does nothing.

1 2
image image

The window should accept the entered URL when Enter is pressed in the input field.

Implementation plan

Changes will mostly be needed in app/javascript/pages/manage-issue-page/CloseDuplicateModal.vue and probably app/javascript/pages/manage-issue-page/CloseDuplicateModal.spec.js

  1. Remove the default footer from the modal (using the no-footer prop like we do in app/javascript/pages/user-page/AddPointsModal.vue)
  2. Add a BForm wrapper around the form (handling the @submit event)
  3. Add a BButton submit button
  4. Update tests

Alternatively, we COULD consider adding some kind of listener for enter key, but I don't think that's the right way to go about it.

BONUS: We could also research whether anyone has already implemented a solution for bootstrap-vue-next and/or is there an open issue in their issue tracker?


/cc @gitlab-org/developer-relations/contributor-success

Edited by 🤖 GitLab Bot 🤖