Fixed blur autocomplete. Follow-up keep result at text input after focusout.

This is a followup of #94, fixing some bugs found later (such as selecting using the mouse).
It better fixes #91
This same code also fixes #75