From 2ae9092a7db9663bab5413ce038375be6c451719 Mon Sep 17 00:00:00 2001 From: Ramasastri Garlapati Date: Wed, 12 Jul 2017 15:40:59 +0530 Subject: [PATCH] #6590 Fixed the issue --- src/typeahead/typeahead.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index 71b807c817..d09776890d 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -74,6 +74,8 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false; + var isFocusOnBlur = attrs.typeaheadFocusOnBlur ? originalScope.$eval(attrs.typeaheadFocusOnBlur) : false; + var appendTo = attrs.typeaheadAppendTo ? originalScope.$eval(attrs.typeaheadAppendTo) : null; @@ -461,7 +463,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap }); element.val(''); } - hasFocus = false; + hasFocus = isFocusOnBlur; selected = false; });