Inside popstateHandler we call event.stopImmediatePropagation when the modal is closed. This is to prevent Naja from handling the snippets - as the modal is closed, we don't need to update its snippets and run the code of other extensions. The disadvantage is that if the title is used as a snippet, it will be updated by Naja when the modal is opened and navigated, but it won't be sorted when the modal is closed. We have to change the title with this extension ourselves.
26
Inside
popstateHandler
we callevent.stopImmediatePropagation
when the modal is closed. This is to prevent Naja from handling the snippets - as the modal is closed, we don't need to update its snippets and run the code of other extensions. The disadvantage is that if the title is used as a snippet, it will be updated by Naja when the modal is opened and navigated, but it won't be sorted when the modal is closed. We have to change the title with this extension ourselves.