From 12c1875e51344af23262fbda282cc2128314f168 Mon Sep 17 00:00:00 2001 From: Maciej Kowalski Date: Tue, 12 Apr 2016 08:09:44 +0200 Subject: [PATCH] fix(typeahead): Blur hide with timeout, to allow other events to be triggered. Fixes #363 --- components/typeahead/typeahead.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/typeahead/typeahead.directive.ts b/components/typeahead/typeahead.directive.ts index c2a0f199c2..8bb0bcdb9f 100644 --- a/components/typeahead/typeahead.directive.ts +++ b/components/typeahead/typeahead.directive.ts @@ -102,7 +102,8 @@ export class Typeahead implements OnInit { @HostListener('blur', ['$event.target']) protected onBlur():void { - this.hide(); + // Allow typeahead container click event to be triggered requires a timeout + setTimeout(this.hide.bind(this), 10); } @HostListener('keydown', ['$event'])