Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typeahead): removed incorrect behavior to do ENTER behavior on TAB #715

Merged
merged 1 commit into from
Jul 11, 2016
Merged
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
10 changes: 2 additions & 8 deletions components/typeahead/typeahead.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,11 @@ export class TypeaheadDirective implements OnInit {
return;
}

// if shift + tab, close items list
if (e.shiftKey && e.keyCode === 9) {
// if tab default browser behavior will select next input field, and therefore we should close the items list
if (e.keyCode === 9) {
this.hide();
return;
}

// if tab select current item
if (!e.shiftKey && e.keyCode === 9) {
this.container.selectActiveMatch();
return;
}
}

public constructor(cd:NgModel, viewContainerRef:ViewContainerRef, element:ElementRef,
Expand Down