MantisBT: master d47a7c60

Author Committer Branch Timestamp Parent
cproensa dregad master 2019-03-09 08:12 master c9f8cddc
Affected Issues  0023037: Focus on project search
 0025594: Projects menu search box should be hidden when having a small number of projects
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

mod - js/common.js Diff File