I have a piece of code where I use ‘element.contextmenu’ event listener attached to a connection arrow which subsequently displays a menu. For some reason when I double mouse click in the middle of the connection line, BPMN recognizes the click as if I clicked on the ‘root’ element and not the connection. There is also no hover effect on the connection line. However, it works as expected when I click towards the end of the connection line.
Has anyone encountered this problem before?
Hi @Eugene , welcome!
Can you maybe share a CodeSandbox that reproduces your issue in a way that we can inspect it?
Hi, I recreated the scenario here sandbox. So, if you right-click in the middle of the connection arrow you have the root element logged to the console but if you click near the edge(when a yellow dot appears on the connection line) you have the connection element logged.
Thanks for sharing! The missing hover box when the segment dragger is active also reveals that the context is not on the connection at this moment
I’d expect the connection to be the correct element in this scenario. Can you maybe open an issue for that in bpmn-js? It will help us to keep things tracked. Then we can discuss how to approach it.