Hi! We’re developing a MIME renderer extension embedding JointJS as the display interface. We’re doing something relatively simple, similar to the examples in this JointJS tutorial page.
In a JupyterLab tab, when we drag and drop objects in our JointJS canvas, the objects tend to “stick” to the cursor even after releasing the mouse in an attempt to drop the object. Clicking multiple times seems to eventually release the object, but the number of clicks is not consistent.
The drag-and-drop works fine when we run JointJS from a plain HTML file outside of JupyterLab.
Our suspicion is that mouse events are being captured or otherwise lost by JupyterLab itself, so that the mouse release events do not consistently reach JointJS.
Does anyone have experience with this sort of problem?
I have not seen something like this. If you put up an example somewhere, perhaps someone can take a look and see if there is an obvious problem.
@jasongrout Thanks for your quick response and sorry for disappearing! We’ve actually now seen that behavior disappear (after some code changes that we expected to have no bearing on it). We’re waiting for advice from higher up on how to proceed in terms of putting up an example, so I’ll update if that goes through or if we figure out what the underlying issue is.
We found the source of the issue! The event listener was being created every time that
renderModel (per the MIME renderer cookiecutter) was being called by JupyterLab, which was fairly frequent.
Our current solution is to just delete any existing event listeners before creating the one we want, but perhaps there is a better solution that we’ll come across.