Changeset |
Projects list js
Changes and clean up for the navbar project list dropdown:
-
When the dropdown is displayed:
- Apply focus to the active list element to position the
scrollable area over that element.
- If the list is empty, apply focus to the searchbox.
-
Manage key events in the dropdown elements:
- When using the list and any key not related to list navigation is
pressed (for example, typing a text for searching), switch the focus
to the search box for it to receive the input.
- When using the searchbox and any key of up, down, pageup, pagedown,
is pressed, switch the focus to the list to allow navigating with
keyboard.
- Escape key in the search box will close the dropdown.
-
Fix hiding the searchbox when only 10 or less items are displayed.
-
Code clean-up:
- Move all the code related to the navbar projects menu to the same
place in the js file.
- Rename variables for less probability of collision with other
unrelated code.
Fixes: 0023037, 0025594 |