Angular material mat-divider is not displaying when printing or saving in Firefox

79 Views Asked by At

I'm encountering an issue with the mat-divider component in my Angular application when trying to print or save a page in Firefox, even using media print css to try make it visible.

Issue

When using window.print() function or press Ctrl + P to print or save a webpage, the mat-divider component is not visible in the printed or saved output. However, it displays correctly on the screen in Chrome.

I was able to reproduce using the stackblitz code provided for the angular material official component page: https://v12.material.angular.io/components/divider/overview

Code: https://stackblitz.com/angular/byleybgjaxy?file=src%2Fapp%2Fdivider-overview-example.ts

My question is, there is a way to make it work and display when printing and saving using Firefox?

Steps to Reproduce:

  • Open that link in Firefox.
  • Type on the console window.print().
  • Observe that the mat-divider component is missing in the printed or saved output.

Obs: You can try on chrome as well, and see this is working fine.

Using chrome:

enter image description here

Using Firefox:

enter image description here

0

There are 0 best solutions below