1904labs / dom-to-image-more

Generates an image from a DOM node using HTML5 canvas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Safari aleatory result

cesarphernandez opened this issue · comments

The functionality dont work always, in the last Safari version have a intermittence between time when library works fine and when not works

Exist a some fix about this o some reason?

We work in
Safari version: Version 16.4 (18615.1.26.11.23)

Would need a LOT more information to help. Can you get a time when it fails and snag the HTML, CSS, JS and make a jsfiddle

Off course!

JSFiddle: https://jsfiddle.net/cesarphernandez/rdx1ztew/118/

In this case, I try to render the content of the DOMElement and his Childs, and after this, I generate a url blob to see the result in the browser.
In Google Chrome, not have a problem, but in Safari, is aleatoreously some times it works fine, in other cases fail

Attach our video of evidence: https://share.cleanshot.com/4DvVmS26

As I comment, the problem is random, possible need to try some times to replicate it

Not sure what you're doing with the URL.createObjectURL stuff, seems to be something jsFiddle offers... but it looks like it's always returning the PNG to me every time... I've tweaked the fiddle... can you try on Safari?
https://jsfiddle.net/7ykfet6c/

In. this case I use URL.createObjectURL, to generate a blob Url to use in the same browser, is more to can view more easy the result, but how I showed u, There are cases in where works fine, but not always and we need that works fine always

I was try with your link, but not works in the first generation of Image, attach our video
https://share.cleanshot.com/JYN7cQ2D

I believe that what happens is that not works fine, when div is change or loaded by first time ,In my case is a use library to generate images with many changes in these divs, and I believe that this error is reproduced when div is change

@IDisposable Have u some update at now?