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

fix(typeahead): use correct selector #5168

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
6 changes: 3 additions & 3 deletions src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
originalScope.$watch(attrs.typeaheadEditable, function (newVal) {
isEditable = newVal !== false;
});
});

//binding to a variable that indicates if matches are being retrieved asynchronously
var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
Expand Down Expand Up @@ -394,12 +394,12 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
case 38:
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
scope.$digest();
popUpEl.children()[scope.activeIdx].scrollIntoView(false);
popUpEl.find('li')[scope.activeIdx].scrollIntoView(false);
break;
case 40:
scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
scope.$digest();
popUpEl.children()[scope.activeIdx].scrollIntoView(false);
popUpEl.find('li')[scope.activeIdx].scrollIntoView(false);
break;
}
});
Expand Down