question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[useExistingCss] doesn't seem to work on Safari

See original GitHub issue

Describe the bug On safari, I was getting a blank page when printing. It started working again after I removed the [useExistingCss]=“true”, but then it wasn’t styled. I have global styles and component level styles, and this seemed to work on

To Reproduce add [useExistingCss]=“true” use safari

I tried to do the above on this project https://stackblitz.com/edit/demo-ngx-print?file=src%2Fapp%2Fapp.component.html

  1. update ngx-print
  2. add [useExistingCss]=“true”
  3. Attempt to print Safari behaves weirdly.

Expected behavior New tab and can print as normal

Screenshots

Desktop (please complete the following information):

  • OS: MacOS Mojave 10.14.3
  • Browser: Safari 12.0.3
  • Version: ngx 1.2.0-beta.2

I think the issue most likely has something to do with the <body onload=window.print();window.close()>, it seems to attempt to print before all the css is loaded

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
MyoHtutAungcommented, Nov 19, 2019

[useExistingCss] = “true” doesn’t work when i deploy the code. It works only on local process.

1reaction
harbonscommented, Jul 24, 2020

[useExistingCss] = “true” doesn’t work when i deploy the code. It works only on local process.

@MyoHtutAung Were you able to solve this issue? I am facing same issue

I also had that error on local process compiling, but print button worked right on Chrome/Firefox. Not yet tested on deploy, but locally using useExistingCss=“true” (without square brackets) solved compiling error. Using latest ngx-print 1.2.0-beta.5 .

Maybe update readme can help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix CSS Issues on Safari
Although many programmers face some difficulties when Safari doesn't support CSS properties, these properties work fine in other browsers.
Read more >
CSS doesn't render correctly on iOS when zooming in
It seems iOS treats zoom as a resize of the window or something so it forces ... Edit 2: The z-index seems to...
Read more >
css doesn't work in Safari
I have this very simple CSS file: ... The class .largura-cheia doesn't work in Safari. Can you help? ... doesn't seem to apply...
Read more >
If Safari on Mac doesn't open a webpage or isn't working as ...
If Safari isn't working as you expect, one of these solutions might help.
Read more >
Safari doesn't render some CSS
The word “Send” shows and on hover CSS styles seems to work when the button is pressed. Button appears more rounded compared to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found