Skip to content

Commit

Permalink
fix(module:message): increase the overlay's zindex tobe the same with…
Browse files Browse the repository at this point in the history
… the inner original zindex style

close NG-ZORRO#1457
  • Loading branch information
wilsoncook committed May 17, 2018
1 parent c91a0f8 commit 137d3d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/message/nz-message.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export class NzMessageBaseService<ContainerClass extends NzMessageContainerCompo
const componentRef = factory.create(this.injector); // Use root injector
componentRef.changeDetectorRef.detectChanges(); // Immediately change detection to avoid multi-checking error
this.appRef.attachView(componentRef.hostView); // Load view into app root
this.overlay.create().overlayElement.appendChild((componentRef.hostView as EmbeddedViewRef<{}>).rootNodes[0] as HTMLElement);
const overlayPane = this.overlay.create().overlayElement;
overlayPane.style.zIndex = '1010'; // Patching: assign the same zIndex of ant-message to it's parent overlay panel, to the ant-message's zindex work.
overlayPane.appendChild((componentRef.hostView as EmbeddedViewRef<{}>).rootNodes[0] as HTMLElement);

return componentRef.instance;
}
Expand Down

0 comments on commit 137d3d5

Please sign in to comment.