Fixed match processing

Before when the text box was clicked, only the word start and end
were updated.  This meant that hitting tab at this point would be
using the wrong set of matches.  This fixes that by just binding
the click and focus events to the keydown handler and everything
works as expected.