auchenberg / vscode-browser-preview

A real browser preview inside your editor that you can debug.
MIT License
4.39k stars 153 forks source link

Canvas doesn't render in Safari on iOS #178

Open eliknebel opened 3 years ago

eliknebel commented 3 years ago

I know its not the typical use case, but using code-server (vscode on a remote server) with browser preview (in iOS) would be a great for web development on iPad, but it appears to render a checkered grid instead of the page.

Looking at the css, there is a css class being applied to the rendered page: .img-hidden{ display: none }. My guess is that this class is supposed to be removed somehow when rendering is finished?

How the page is shown initially:

Screen Shot 2021-02-10 at 10 59 05 AM

Turning off the display: none css attribute:

Screen Shot 2021-02-10 at 10 58 50 AM
auchenberg commented 3 years ago

This extension has never been tested outside of Electron, so that's a new use-case. The rendering pipeline is using the hidden image to convert the base64 PNG to an image, which is then rendered to the

So something must go wrong in the process of decoding the base64 to img.