Skip to content

MathJax crashes if rendering target removed from document context #730

@ysulyma

Description

@ysulyma

I have a single-page app that uses MathJax as well as AJAX navigation. If a user navigates away from a page before MathJax has finished rendering, it will try to access a span that no longer exists in the document, resulting in an error (and breaking all subsequent JavaScript execution). The error occurs at line 589 of jax/output/HTML-CSS/jax.js.

This is kind of strange given that MathJax has no problem with e.g. processing document fragments before they are inserted into the document.

How can I tell MathJax to abort rendering of these elements?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions