orion / freeipa

Forked from freeipa 5 years ago
Clone

a8723bb Combobox keyboard support

Authored and Committed by pvoborni 11 years ago
    Combobox keyboard support
    
    Combobox can be controlled just by using keyboard.
    
    When value list is closed, user can:
      * use UP and DOWN error to open list, it will focus the list and
        select previous/next value
      * when CB is non-editable, user can start typing, first character will open
        list, second will be entered into search input. Note: I wanted to copy the
        first char to the search box as well, but I did not figure out reliable
        method for converting keycode to char for non ASCII keyboard layouts
      * ESCAPE, ENTER, TAB keys are handled to allow keyboard operations in a
        container
    
    When value list is opened:
      * CB tries to keep focus on either search input or a select
      * when focus is lost, the value list is closed. So  user can click anywhere
        on a page to close it - two comboboxes can't be opened on the same time
      * hitting TAB key switches between search and select
      * if CB is not searchable, hitting TAB will close the value list and select
        input textbox
      * hitting ESCAPE on will close the value list
      * hitting ENTER on search input will invoke search operation
      * hitting ENTER on select will close the value list
      * hitting UP/DOWN arrows will select previous/next values
    
    Additional modifications:
      * opening arrow and search button were made non-focusable. It fixes the
        'wrong focus area' bug and simplifies keyboard usage. It doesn't affect
        mouse usage.
    
    https://fedorahosted.org/freeipa/ticket/3324
    
        
file modified
+186 -27