bpmn-io / diagram-js

A toolbox for displaying and modifying diagrams on the web.
MIT License
1.69k stars 419 forks source link

Do not update context pad visibility on `element.marker.update` if element is not target #912

Closed philippfromme closed 4 months ago

philippfromme commented 4 months ago

I investigated https://camunda-modeling.sentry.io/share/issue/d4edab8eb6044c74b7c933158b06a69a/ which happens when reacting to element.marker.update which calls canvas.hasMarker for each of the current targets. In some cases that I couldn't reproduce it seems like at least one of the targets has been deleted at the time of calling canvas.hasMarker which leads to a A DOM element reference is required since there is no graphical element anymore. While I couldn't reproduce the issue I changed the implementation so context pad visibility is updated on element.marker.update only if the element is a target. This might or might not fix the issue. We'll have to keep an eye on the Sentry issue.