Skip to content

Not working with Content tabs #45

@dmaggi

Description

@dmaggi

When adding draw.io diagrams into a content tab like this:

=== "Tab1"
    ![](img/diagram1.drawio)

=== "Tab2"
    ![](img/diagram2.drawio)

When viewing the diagrams in the web browser, only the diagram on Tab 1 loads initially.
If I switch to Tab 2, its diagram does not appear unless I reload the page (F5). After reloading, the behavior flips: Tab 2 loads correctly, but switching back to Tab 1 shows nothing until I reload again.

It seems that the diagrams are only rendered on the tab that is visible during page load, and switching tabs does not trigger a re-render.

How can I fix this behavior?
Is there a JavaScript solution that forces the diagram to re-render when switching tabs?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions