Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Only resetMatches when showing matches. #3119

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,8 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap

// Keep reference to click handler to unbind it.
var dismissClickHandler = function (evt) {
if (element[0] !== evt.target) {
resetMatches();
scope.$digest();
if (element[0] !== evt.target && scope.matches.length !== 0) {
scope.$apply(resetMatches);
}
};

Expand Down