Skip to content

Commit

Permalink
fix(module:auto-complete): close the panel when tapping scrollb… (NG-…
Browse files Browse the repository at this point in the history
…ZORRO#4551)

* fix(module:auto-complete): close the panel when tapping scrollbar on Windows

close NG-ZORRO#4333

* test: fix test
  • Loading branch information
hsuanxyz authored and wenqi73 committed Jan 17, 2020
1 parent cbaa252 commit b341ce4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export class NzAutocompleteTriggerDirective implements ControlValueAccessor, OnD
}

handleBlur(): void {
this.closePanel();
this._onTouched();
}

Expand Down
12 changes: 0 additions & 12 deletions components/auto-complete/nz-autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,6 @@ describe('auto-complete', () => {
expect(fixture.componentInstance.trigger.panelOpen).toBe(false);
}));

it('should close the panel when the trigger blur', fakeAsync(() => {
dispatchFakeEvent(input, 'focusin');
fixture.detectChanges();
flush();

expect(fixture.componentInstance.trigger.panelOpen).toBe(true);

dispatchFakeEvent(input, 'blur');

expect(fixture.componentInstance.trigger.panelOpen).toBe(false);
}));

it('should not close the panel when the user clicks this input', fakeAsync(() => {
dispatchFakeEvent(input, 'focusin');
fixture.detectChanges();
Expand Down

0 comments on commit b341ce4

Please sign in to comment.