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

Commit 7949494

Browse files
committed
fix(typeahead): change to original scope
- Change to original scope for running $digest Closes #5588 Fixes #5467
1 parent dd62c73 commit 7949494

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/typeahead/typeahead.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
401401
evt.stopPropagation();
402402

403403
resetMatches();
404-
scope.$parent.$digest();
404+
originalScope.$digest();
405405
break;
406406
case 38:
407407
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
@@ -455,7 +455,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
455455
if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
456456
resetMatches();
457457
if (!$rootScope.$$phase) {
458-
scope.$digest();
458+
originalScope.$digest();
459459
}
460460
}
461461
};

0 commit comments

Comments
 (0)