Hi Gowtham,
Thanks for your reply. I see your example, and we're doing it the same way, but somehow, in some of the diagrams, if nodes disappear from the view (for example, we zoom in enough for them to get out of the viewport, or we drag the diagram so the node gets out of the viewport), they also disappear from the DOM, and when I zoom out or move the diagram panel again so they get "visible" they appear in the DOM again.
I imagine there's some config in the Diagram component that if some props are passed, the dom is not always loaded for all the diagram, and it generates it depending on the visible content of the diagram, am I right?
In that case, do you know how can I turn that off so the whole diagram (not only the part which is visible in the viewport in that specific moment) is always appearing on the DOM? That way, if I set a eventListener it will happen as your example and the eventListener won't disappear (actually now we know that what disappears and reappears is the node, so when it appears again it does not have the eventListener attached, which makes sense since it's a "new" HTML node).
I've already googled it but couldn't find the answer in your Documentation.
Thanks again, hope I've made myself clear and we can figure out what of our config is causing that.