Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/select/nz-select.component.ts
Original file line number Diff line number Diff line change
@@ -271,7 +271,8 @@ export class NzSelectComponent implements ControlValueAccessor, OnInit, AfterVie
event.preventDefault();
}
} else {
if (keyCode === SPACE || keyCode === TAB) {
if (keyCode === TAB) {
// if (keyCode === SPACE || keyCode === TAB) { // #2201
this.nzOpen = false;
this.nzOpenChange.emit(this.nzOpen);
event.preventDefault();
3 changes: 2 additions & 1 deletion components/select/nz-select.spec.ts
Original file line number Diff line number Diff line change
@@ -212,7 +212,8 @@ describe('nz-select component', () => {
flush();
fixture.detectChanges();
expect(testComponent.open).toBe(true);
dispatchKeyboardEvent(select.nativeElement.querySelector('.ant-select-selection'), 'keydown', SPACE);
// #2201, space should not close select panel
dispatchKeyboardEvent(select.nativeElement.querySelector('.ant-select-selection'), 'keydown', TAB);
fixture.detectChanges();
flush();
fixture.detectChanges();

0 comments on commit 3d7fe39

Please sign in to comment.