Closed slauriere closed 3 years ago
@slauriere please add the "expected result" to this ticket (even if it may seem obvious) so that it's explicit what doesn't actually work. Also, detail a little point 4 from the steps to reproduce: the "check" means that at that point the 2 files are expected to be present as page attachments?
@lucaa I've updated the ticket description indeed: "Expected result" section added + point 4 about the file check slightly reworded
Issue reproduces on XWiki 12.10.5 and 9.11, Chrome 89, Diagram Application (Pro) 1.16-rc-2
Diagram:
More actions > Print Preview:
The print preview loads print.css
which forces this style:
#body, #xwikimaincontainer, #xwikimaincontainerinner, #xwikicontent, #mainContentArea {
...
width: auto !important;
}
which makes the diagram container (child of #xwikicontent
) have 0 width. This in turn triggers this code from GraphViewer.js
:
if (this.checkVisibleState && container.offsetWidth == 0 && typeof MutObs !== 'undefined') {
// Delayed rendering if inside hidden container and event available
...
Basically draw.io thinks the diagram container is hidden and thus delays (by default) the rendering until it becomes visible. Which doesn't happen in our case because our diagram container is visible but has 0 width. The easy fix is to set a minimum width on the diagram container.
Steps to reproduce
Actual result
NB: there is no error in the JavaScript console
Expected result
Environment