Skip to content

Commit

Permalink
fix(typeahead): fix autoselect on tab key with typeaheadMinLength=0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSurmay authored and valorkin committed Jan 5, 2018
1 parent 59c0bf9 commit eaed118
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/typeahead/typeahead.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export class TypeaheadDirective implements OnInit, OnDestroy {
}

// enter, tab
if (e.keyCode === 13 || e.keyCode === 9) {
if (e.keyCode === 13) {
this._container.selectActiveMatch();

return;
Expand Down Expand Up @@ -261,6 +261,7 @@ export class TypeaheadDirective implements OnInit, OnDestroy {
// if an item is visible - don't change focus
if (e.keyCode === 9) {
e.preventDefault();
this._container.selectActiveMatch();

return;
}
Expand Down

0 comments on commit eaed118

Please sign in to comment.