Prevent page leaving if digram is not saved

I’m new in using bpmn-js, so I’m sorry if the answer to my question is obvious.
I didn’t figure out if there is any flag or function that tells me if the diagram has been saved or not so to prevent accidental page leaving.
Thank You in advance

Hi @costi and welcome to the forum,

please check out this post, where @philippfromme provided a code snippet showing how to find out whether a diagram state is dirty (aka. not saved).


1 Like