js suggest: better keyup/keydown handling
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 13 Jun 2016 18:08:44 +0000 (11:08 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 20 Jun 2016 20:38:08 +0000 (13:38 -0700)
commit57271df94c1a1862a019b7dc939b801a723f2ec3
tree9461af7d3b910ea737618ba2987a1ca84ad2d9e1
parent3d3ad9083476953db08f41048460d87813c3db85
js suggest: better keyup/keydown handling

some actions, like ctrl-click, trigger the keyup event even though it
has no bearing on autocomplete. This leads to extra impression-results
tracking events being fired. The existing keypress event, per spec,
handles input that normally produces a character value. The keyup /
keydown events should only be handling special non-character producing
keys that directly effect autocomplete. As such put together a list of
relevant keys and only fire on those.

Change-Id: I8d2a4fade84a5b94a81fa7ee0192912d2407ba92
resources/src/jquery/jquery.suggestions.js