Skip to content

Commit

Permalink
fix: ignore tab when dropdown is closed and addTag is false
Browse files Browse the repository at this point in the history
closes #1212
  • Loading branch information
varnastadeus committed Jun 27, 2019
1 parent 9d8ccf3 commit 7f31ea6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ng-select/ng-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,10 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C
}

private _handleTab($event: KeyboardEvent) {
if (this.isOpen === false && !isDefined(this.addTag)) {
if (this.isOpen === false && !this.addTag) {
return;
}

if (this.selectOnTab) {
if (this.itemsList.markedItem) {
this.toggleItem(this.itemsList.markedItem);
Expand Down

0 comments on commit 7f31ea6

Please sign in to comment.