rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
892 stars 128 forks source link

Package documentation not rendering in Chrome/Edge #292

Closed jimjam-slam closed 2 years ago

jimjam-slam commented 2 years ago

When I load https://pagedown.rbind.io/ in Safari 15.5, it loads as expected. But on Edge 103.0.1264.51 and Chrome 103.0.5060.114, I'm only seeing the first four pages, and all content after the header 'Contents' is missing:

image

I do see the full, unstyled content of the page flash briefly before this.

Inspecting the DOM on Edge and Chrome, I see that div.pagedjs_pages has style="--pagedjs-page-count: 4;" instead ofstyle="--pagedjs-page-count: 49;", and it only has four child divs. The full content of the documentation does still seem to be in the template element.

Seems like something is going wrong with the paged CSS styling or rendering!

cderv commented 2 years ago

Thank you for the repot. I can see that ! It seems something as changed in our last build or in browser.

cderv commented 2 years ago

So it seems to be an issue related to paged.js in new / recent chrome version : https://github.com/pagedjs/pagedjs/issues/84

I'll try to see if I can apply some workaround from there. Otherwise, we may maybe block and needs to wait for a fix upstream 😓

For more context, in our case this is something related to the TOC. Setting toc: false will solve the issue;

cderv commented 2 years ago

I fixed this on our side by tweaking the default CSS we use. This seems to be a good workaround while waiting for a new Paged.js version

yihui commented 2 years ago

Excellent. Thanks!

cderv commented 2 years ago

A note from paged.js developers: We should try update to latest version.