Click Handler of Share Does Not Fire

When clicking on the below Shape, I did not see the statement “close notes before popping up menu” logged to the console. Why is this the case?




        fill: '#000000',

        name: 'menu',

        width: 20, height: 20,

        margin: 15,

        alignment: go.Spot.Right,

        columnSpan: 1,

        stroke: '#000000',

        strokeWidth: 0.2,

        geometry: go.Geometry.parse(this.icons.ellipsis, true),

        cursor: 'pointer',

        click: (e, obj: go.Node) => {

          console.log('close notes before popping up menu');

          // this.backgroundClicked.emit();



      new go.Binding('visible', 'shape', o => o !== 'circle'),

      new go.Binding('visible', 'define', d => (d ? false : true))),


        // define a context menu for each node

        contextMenu: this.mainContext




Are you sure that you clicked on it? Maybe it was not visible. Maybe there was a transparent object in front of it. Maybe you happened to click just outside of the geometry. Maybe it’s in a Part that is not visible or is not pickable. Of maybe it is in a Layer that is temporary or doesn’t support picking (i.e. hit-testing).

There are probably other plausible scenarios that could explain the (non-)behavior.

I click on the Shape and the contextmenu successfully opened, so I am sure the Shape is visible and I clicked on the right place. I can post my huge node template which includes this Shape “button” to open the contextmenu; but I can affirm the fact that I didn’t create any special layers.

I have included a picture of what I want to achieve: if I hover over the yellow triangle of the bottom right, the div with the “hello world” would show. I click on the context menu button - circled in red, which should console.log() as per my original question. You can see that the contextmenu popup, affirming the “…” Shape is visible and I clicked at the right place.

I just want to use the click: handler to fire an event which would make the “hello world” div go away when I popup the contextmenu, but the click: handler does not fire.

That’s very odd. And you are clicking with the primary (probably left) mouse button, yes?

You could try debugging the panels, starting at the container of that dot-dot-dot object and going up the chain eventually to the Node and trying all of the siblings at each level, by setting their background to an obvious color such as “lime” or “cyan”. If at any time the color obscures the button, then you know why it isn’t getting the click event.

For example, might the “Node 1” TextBlock be extending the width of the panel and also be in front of the button? Try setting the TextBlock.background.