Prevent submitting form when pressing enter in transfer location search
requested to merge 393198-group-transfer-enter-invalid-namespace-or-nothing-followed-by-enter-does-not-ask-for-2 into master
What does this MR do and why?
Related to #393198 (closed)
If you press enter in the Transfer group dropdown search it submits the form because of the way HTML form behavior works in browsers. This MR adds @keydown.enter.prevent
to the search input so it does not submit the form.
Originally I started migrating to GlCollapsableListbox
but then realized that doesn't yet support infinite scroll for grouped options which we need. I have decided to fix this bug and then opened #498137 to address the migration.
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 recordingsfff
Before | After |
---|---|
Screen_Recording_2024-10-07_at_1.58.42_PM | Screen_Recording_2024-10-07_at_1.58.01_PM |
How to set up and validate locally
- Go to a group you own -> Settings -> General -> Advanced
- Open the dropdown in
Transfer group
section - Type in the search input then press enter
- The form should not submit
Edited by Peter Hegman