dom-to-image icon indicating copy to clipboard operation
dom-to-image copied to clipboard

NOT WORKING - Library is not working in latest chrome with display GRID

Open rashidaghadiinfotech opened this issue 2 years ago • 7 comments

Hello there,

I am using this library from couple of years and this was working fine. Before couple of days, chrome released latest version and suddenly capturing area stopped working.

` clearInterval($preview_iframe); var node = document.getElementById('diagram-container-wrapper');

domtoimage.toPng(node) .then(function (dataUrl) { var img = new Image(); img.src = dataUrl; document.body.appendChild(img); }) .catch(function (error) { console.error('oops, something went wrong!', error); });`

try to place this code in console and you will see how badly image is getting broken. Can anyone look in this matter and guide me what is wrong here?

#overall-container div has display grid. and seems that is causing issue.

Thanks.

rashidaghadiinfotech avatar Mar 07 '22 10:03 rashidaghadiinfotech

I have the same problem with html-to-image and react-component-export-image. I am also using CSS grid.

pawelkrystkiewicz avatar Mar 08 '22 13:03 pawelkrystkiewicz

I have same trouble too. I found that the 'grid-area' property causing this issue.

And It starts from chromium 99.0.4820.0. (R957400)

frebern avatar Mar 10 '22 08:03 frebern

@frebern @pawelkrystkiewicz @pbakaus @ulikoehler Guys, you guys found any solution on this?

rashidaghadiinfotech avatar Mar 16 '22 04:03 rashidaghadiinfotech

@rashidaghadiinfotech I switched to flex because it was feasible for my case. Here is the chromium ticket: https://bugs.chromium.org/p/chromium/issues/detail?id=1305997

pawelkrystkiewicz avatar Mar 16 '22 08:03 pawelkrystkiewicz

I am planning to switch to flex but this is not at all ideal. Hoping for a fix soon.

mell0kat avatar Mar 17 '22 18:03 mell0kat

I gather it will be fixed in Chrome 101, which is due in April: https://chromestatus.com/features/schedule

Not surprisingly, it also affects Edge 99, BTW. Firefox and Safari seem to work fine.

MSCAU avatar Mar 23 '22 05:03 MSCAU

Are there any news from bug-fix, I'm still having same issue...

mustafa-soylemez avatar May 04 '22 12:05 mustafa-soylemez