I am having trouble getting the
ObjectDoubleClicked diagram listener to fire in tests, it works fine in regular usage. I’m using GoJs 2.1.40, Node 14.16, Chrome 90.
Normally what happens when double-clicking is that a
ObjectSingleClicked is fired first, followed by
ObjectDoubleClicked on the second click.
When running the tests, two
ObjectSingleClicked events are fired consecutively, never getting to the
ObjectDoubleClicked. If I remove the single-click functionality it behaves the same, so there shouldn’t be anything interrupting the double-click.
Some other details I’ve observed are that the single-click events are consistently less than 500ms apart when logging the timestamp, so they should qualify as a double click. Adding a DOM event listener for double-click also works as expected, which makes me think this is an issue with Go. However, I tried the same example using Cypress for the testing suite and it worked fine. The same behavior also occurs for different Go elements, Links, Nodes, etc.
Is there something about the way that Go handles clicks that would cause this? Are there any other ways that I could go about debugging this issue?