Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Safari 10.1.2] Can't render FontAwesome Icon in canvas. #1610

Open
stevencherry1 opened this issue Jul 30, 2018 · 3 comments
Open

[Safari 10.1.2] Can't render FontAwesome Icon in canvas. #1610

stevencherry1 opened this issue Jul 30, 2018 · 3 comments

Comments

@stevencherry1
Copy link

Bug reports:

I am using this library to convert FontAwesome Icons on the html page into canvas, then converting them to base64 string, and finally, to byte[] for use in a crystal report. On Firefox and Chrome, this functionality works perfectly. On Safari 10.1.2, the canvas element doesn't render the icon; It shows as a blank, white square.

To Reproduce:

  1. Add a fontawesome 4 icon on to html page.
  2. Call
    html2canvas(document.querySelector(#icon), { logging: true, allowTaint: true })
  3. When promise fulfills, call:
    canvas.toDataURL();
    document.body.appendChild(canvas);

The canvas element shows up as blank white. The base64 string is valid, but it is also blank white (as expected i suppose).

On a separate, but less important note. I had a bug in safari only, where if the element has display:inline-block, the canvas would be empty. I had to change it to display:inline-flex for the canvas to load properly-ish

Specifications:

  • html2canvas version tested with: v1.0.0-alpha.12
  • Browser & version: Safari 10.1.2
  • Operating system: OSX Yosemite 10.10.5
@Mivnv
Copy link

Mivnv commented Sep 6, 2018

+1

@Dragooon
Copy link

Dragooon commented Sep 7, 2018

I sent a PR to fix this issue

@Gunyon
Copy link

Gunyon commented Jan 26, 2019

the same problem also with react-country-flag svgs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants