Clicking outside quickly now closes it.

@davidjgonzalez 

Small suggestion here to close quickly when clicking outside its ui.
Also removed the close from keypress handler since the keydown will always happen first.