Input onKeyPress Function Working Only After Clicking Away

This is nearly a year late but I want to say THANK YOU.

I built an autocomplete address input and without this debounce, it was all sorts of wacky.

Thanks again!