Skip to content

Commit

Permalink
fix(module:drawer): don't prevent events when is false
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jun 16, 2020
1 parent d0c36d6 commit 5854622
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const NZ_CONFIG_COMPONENT_NAME = 'drawer';
class="ant-drawer"
[nzNoAnimation]="nzNoAnimation"
[class.ant-drawer-open]="isOpen"
[class.no-mask]="!nzMask"
[class.ant-drawer-top]="nzPlacement === 'top'"
[class.ant-drawer-bottom]="nzPlacement === 'bottom'"
[class.ant-drawer-right]="nzPlacement === 'right'"
Expand Down
2 changes: 2 additions & 0 deletions components/drawer/drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ describe('NzDrawerComponent', () => {
component.open();
fixture.detectChanges();
expect(overlayContainerElement.querySelector('.ant-drawer')!.classList.contains('ant-drawer-open')).toBe(true);
expect(overlayContainerElement.querySelector('.ant-drawer')!.classList.contains('no-mask')).toBe(true);
expect(overlayContainerElement.querySelector('.ant-drawer .ant-drawer-mask')).toBe(null);
component.showMask = true;
fixture.detectChanges();
expect(overlayContainerElement.querySelector('.ant-drawer')!.classList.contains('no-mask')).toBe(false);
});

it('should set nzMaskStyle & nzBodyStyle', () => {
Expand Down

0 comments on commit 5854622

Please sign in to comment.