ObjectSingleClicked doesn't work sometime

Hi, I have added a event listener which should trigger on node click. But sometimes it doe’t trigger on node click. Also when I drag a item from Palette to canvas and clicks it, this listener doesn’t works.

myDiagram.addDiagramListener(“ObjectSingleClicked”, function (e: any, node: any) {

        lastKey = e.subject.part.data.key


Here, this listener sometimes gives the node info, sometimes it doesn’t. Please check there is any issue it this. Also if there is any alternate method for it, provide provide that also.

We don’t know of any bugs involving any events.

It would help if you showed a small screenshot along with an annotation showing where you clicked. And the node template.

This talks about different kinds of events: GoJS Events -- Northwoods Software