-
- Downloads
There was a problem fetching the pipeline summary.
Merge branch 'lbennett/gitlab-ce-17465-search-for-project-with-cursor-keys' into 'master'
17465 Fixed dropdown cursor key navigation ## What does this MR do? This MR fixes the use of cursor/arrow/enter key events with search dropdowns, allowing a user to navigate up and down the list with the arrow keys and then select their item with the enter key. It also applies some *minor* scroll user experience fixes, such as resetting the selected dropdown item every time it opens/closes (also stops multiple dropdowns conflicting) and forcing the dropdown scroll to scroll right to the top or bottom depending on whether they have selected the first or last item, respectively. ## Are there points in the code the reviewer needs to double check? I would like someone with GitLab experience to check over whether this would harm any unique implementations of the GitLabDropdown or SearchAutocomplete. ## Why was this MR needed? The current version has incorrectly behaving search dropdowns in the navbar, they either do not navigate using the keyboard or do not use the enter keystroke to select a highlighted item. ## What are the relevant issue numbers? Fixes #17465. Closes #20752. Closes #21014. **Contributes** to #20754. ## Screenshots (if relevant)  See merge request !4781
parent
92d568ac
No related branches found
No related tags found
Pipeline #
Showing
- app/assets/javascripts/gl_dropdown.js 43 additions, 31 deletionsapp/assets/javascripts/gl_dropdown.js
- app/assets/javascripts/search_autocomplete.js 14 additions, 4 deletionsapp/assets/javascripts/search_autocomplete.js
- spec/javascripts/fixtures/gl_dropdown.html.haml 16 additions, 0 deletionsspec/javascripts/fixtures/gl_dropdown.html.haml
- spec/javascripts/gl_dropdown_spec.js.es6 119 additions, 0 deletionsspec/javascripts/gl_dropdown_spec.js.es6
- spec/javascripts/search_autocomplete_spec.js 4 additions, 4 deletionsspec/javascripts/search_autocomplete_spec.js
spec/javascripts/gl_dropdown_spec.js.es6
0 → 100644
Please register or sign in to comment