Skip to content

Commit

Permalink
fix(module:drawer): fix z-index level (#3405)
Browse files Browse the repository at this point in the history
close #3402
  • Loading branch information
hsuanxyz authored and wenqi73 committed May 17, 2019
1 parent fd47605 commit 663f6c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions components/drawer/nz-drawer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
[class.ant-drawer-bottom]="nzPlacement === 'bottom'"
[class.ant-drawer-right]="nzPlacement === 'right'"
[class.ant-drawer-left]="nzPlacement === 'left'"
[style.transform]="offsetTransform">
<div class="ant-drawer-mask" (click)="maskClick()" *ngIf="nzMask" [style.zIndex]="nzZIndex" [ngStyle]="nzMaskStyle"></div>
[style.transform]="offsetTransform"
[style.zIndex]="nzZIndex">
<div class="ant-drawer-mask" (click)="maskClick()" *ngIf="nzMask" [ngStyle]="nzMaskStyle"></div>
<div class="ant-drawer-content-wrapper {{ nzWrapClassName }}"
[style.zIndex]="nzZIndex"
[style.width]="width"
[style.height]="height"
[style.transform]="transform">
Expand Down
7 changes: 1 addition & 6 deletions components/drawer/nz-drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,7 @@ describe('NzDrawerComponent', () => {
component.open();
fixture.detectChanges();
expect(overlayContainerElement.querySelector('.ant-drawer')!.classList.contains('ant-drawer-open')).toBe(true);
expect((overlayContainerElement.querySelector('.ant-drawer .ant-drawer-mask') as HTMLElement).style.zIndex).toBe(
'1001'
);
expect(
(overlayContainerElement.querySelector('.ant-drawer .ant-drawer-content-wrapper') as HTMLElement).style.zIndex
).toBe('1001');
expect((overlayContainerElement.querySelector('.ant-drawer') as HTMLElement).style.zIndex).toBe('1001');
});

it('should nzPlacement work', () => {
Expand Down

0 comments on commit 663f6c1

Please sign in to comment.