• 
      

    Fix 'enter' in autocomplete fields (djblets)

    Review Request #5282 — Created Jan. 20, 2014 and submitted — Latest diff uploaded

    Information

    Djblets
    master

    Reviewers

    Fix 'enter' in autocomplete fields (djblets)

    Handling of the 'enter' key for autocomplete fields like people and groups
    wasn't correct, because the djblets handler (which submits the field) was
    running before the autocomplete handler (which populates the field with the
    current selected item).

    The fix is to ensure that the keydown handlers run in the other order. This
    change does the djblets side of that, adding a 'deferEventSetup' option.

    Reproduced the bug. After this fix (and the matching reviewboard one), I can
    press "enter" with a selected user and it will properly populate the field.