Way cleaner way of closing typeahead menu on blur