niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.48k stars 4.8k forks source link

Font/h2 elements getting doubled/tripled in output #3076

Open scdozer opened 1 year ago

scdozer commented 1 year ago

i have been struggling to figure out whats going on here.

  1. this is the only dom->data uri package i can find that works well with safari
  2. im trying to force my component to render before calling html2canvas
  3. the final output always has the h2 element doubled/trippled
  4. i am doing a bunch of rendering updates to the h2, so possibly its snapshotting while its still rendering?
  5. not entirely sure, but seems like a lot of the time this only happens on safari (both web and ios)

Screenshot 2023-06-09 at 1 03 23 PM Screenshot 2023-06-09 at 1 03 43 PM

scdozer commented 1 year ago

it is happening in chrome too actually