Skip to content

Commit

Permalink
fix(module:drawer): content overflow when placement is top or bottom (#…
Browse files Browse the repository at this point in the history
…4423)

close #4354
  • Loading branch information
hsuanxyz authored and simplejason committed Nov 18, 2019
1 parent 5283a32 commit 9451de5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions components/drawer/nz-drawer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
[style.height]="height"
[style.transform]="transform">
<div class="ant-drawer-content">
<div class="ant-drawer-wrapper-body"
[style.overflow]="isLeftOrRight ? 'auto' : null"
[style.height]="isLeftOrRight ? '100%' : null">
<div class="ant-drawer-wrapper-body" [style.height]="isLeftOrRight ? '100%' : null">
<div *ngIf="nzTitle || nzClosable"
[class.ant-drawer-header]="!!nzTitle"
[class.ant-drawer-header-no-title]="!!nzTitle">
Expand Down
3 changes: 0 additions & 3 deletions components/drawer/nz-drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,6 @@ describe('NzDrawerComponent', () => {
component.placement = 'right';
component.open();
fixture.detectChanges();
expect(
(overlayContainerElement.querySelector('.ant-drawer .ant-drawer-wrapper-body') as HTMLElement).style.overflow
).toBe('auto');
expect(
(overlayContainerElement.querySelector('.ant-drawer .ant-drawer-wrapper-body') as HTMLElement).style.height
).toBe('100%');
Expand Down
1 change: 1 addition & 0 deletions components/drawer/style/drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
&-content {
position: relative;
z-index: 1;
overflow: auto;
background-color: @component-background;
background-clip: padding-box;
border: 0;
Expand Down

0 comments on commit 9451de5

Please sign in to comment.