Change node cursor while hover and dragging

I’m trying to change the default cursor A, to cursor B when hovering over a node, and then to cursor C when the node is being dragged (with the mouse button down, InputEvent.left).
But I can either only get A to C using onHold event of the Node.
Or from A to B using mouseEnter, mouseLeave, but when I add onHold it doesn’t change anything.

You probably want to override the DraggingTool.doActivate function and change the cursor there instead of onHold.

myDiagram.toolManager.draggingTool.doActivate = function () {;
  this.diagram.currentCursor = 'wait';

I tried that before (saw it in another post), but when my node itself has an specific cursor, this only works with Microsoft Edge and not with Chrome.
Is there any way to make it work in Chrome? and also when dragging from a palette to the diagram?

Thanks in advance

Setting the currentCursor in the doActivate isn’t working on Chrome? I’m not seeing that behavior. What do you mean that your node has a specific cursor?

As for dragging from a palette, you probably want to use a mouseDragOver function on your diagram.

If my Node has the “cursor” like this:
movable: true,
cursor: ‘grab’,

In Chrome it behaves like this:

and in Edge it behaves as expected:

This is actually a bug. Chrome uses the “-webkit-” prefix for certain cursors, so we try to be smart about prepending that when setting the Diagram.currentCursor, but we weren’t properly comparing against the prior cursor value to make sure the cursor updated properly in some cases. This will be fixed in the next release, thanks for spotting it.

That said, cursors in Chrome still behave oddly sometimes, not updating as soon as the style is changed on the canvas, so we’ll see if we can figure out what’s going on there. (Actually, this only seems to manifest when the dev tools are open…)

We just released 1.8.21 which should resolve this cursor issue.

I just updated my version of GoJS and the cursor is still not changing in Chrome, until I release the mouse button :-(

Do you have dev tools open? There’s a bug in Chrome with dev tools and the mouse cursors.

nop, it’s closed.

Interesting, do you have a simple HTML file you could send us that reproduces the problem? You could email us at gojs AT