diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index a2274b0f9d..5af1db14c1 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -368,9 +368,11 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position']) if (evt.which === 40) { scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length; scope.$digest(); + popUpEl.children()[scope.activeIdx].scrollIntoView(false); } else if (evt.which === 38) { scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1; scope.$digest(); + popUpEl.children()[scope.activeIdx].scrollIntoView(false); } else if (evt.which === 13 || evt.which === 9) { scope.$apply(function () { scope.select(scope.activeIdx); @@ -570,7 +572,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position']) }; }]) - .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { + .filter('typeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { var isSanitizePresent; isSanitizePresent = $injector.has('$sanitize'); diff --git a/template/typeahead/typeahead-popup.html b/template/typeahead/typeahead-popup.html index 20a362bd6c..43693ac35e 100644 --- a/template/typeahead/typeahead-popup.html +++ b/template/typeahead/typeahead-popup.html @@ -1,5 +1,5 @@