marp-team / marp-core

The core of Marp converter
MIT License
766 stars 129 forks source link

Apply workaround for vanished <marp-auto-scaling> component in Chrome 105+ #312

Closed yhatt closed 2 years ago

yhatt commented 2 years ago

I found sometimes the content of <marp-auto-scaling> component may not render in the first rendering of Chrome/Chromium 105 beta and later. Computing DOM positions is correct but contents are not painted at the first time.

Because of this problem, yhatt/marp-cli-example is temporally using Chromium 104 provided by the old Puppeteer, instead of the latest Chromium 105. https://github.com/yhatt/marp-cli-example/commit/b2469408d8aa18d67300515e1f47bbf0272ef516

I don't know the clear reason why, but I guess nested shadow DOMs may prevent painting the content of SVG. Flushing <svg> element by changing display style will render. Thus, I've patched to <marp-auto-scaling> component to flush display style on mounted.

By adopting the updated component, I've confirmed to fix vanished auto-scaling content when exporting image by Marp CLI.