Dragged icon shown on mouse pointer even after dropping dragged item

For some requirement we Upgraded GoJs from version 1.6 to 1.8.38, from that time we are facing issue while dragging item from one tree to other tree.

in above image I dragged “Finance” from one tree and dropped on “Project Service”, it is dropped properly but dragged icon is still shown with mouse pointer and it will be shown until we click outside diagram.
please help me, thanks in advance.

Use the go-debug.js library instead of the go.js library, and try it again, looking carefully at the console output for warnings and errors.

Before changing to go-debug.js, it was throwing bellow error

After changing to go-debug.js it is throwing

There is no more stack trace? What is your code doing at that time?

I didn’t understand what did you mean?

That is the only error thrown in browser console.

I just would like to know more about what your code is doing so that I can guess what is wrong.

Do you have any code that sets the cursor? If so, when does it do so?

I changed GoJs version back to 1.6.18, in that case it is not throwing any error at all. if there is an error in code then it should throw error in both version.

In my case, there are two diagrams and using drag-drop I am handling drag and drop.
One more thing, I do not see any stack trace while using go-debug.js.

There can be an error in the code using the library that was not detected in the older version.

How can I reproduce the problem?

I am unable to tell you how you can reproduce this issue as I am also unaware of how this issue is occurring.

In browser console after first load only I am getting “e.diagram” null in “mouseDragEnter” event.

In above case I am getting “e.diagram” null, if I handle null case in above event issue still exists.

@walter why it is not showing stack trace even I am using go-debug.js?

I cannot explain that – what is the value of e?

As documented,
https://gojs.net/latest/api/symbols/GraphObject.html#mouseDragEnter , a transaction is already ongoing by the DraggingTool, so you do not need to start and commit one.

What are you trying to achieve by setting that data.dragover property? What else does that function do, and what does your mouseDragLeave event handler do?

It occurs to me that there could be a simple cause for such inexplicable behavior – you have more than one GoJS library loaded at the same time, and some of the code from one library is operating on objects created or modified by the other library.

Please check all of the library file loads and make sure that you are only loading the desired go.js or go-debug.js only once. And that you don’t load both of those files either.

I replaced bellow two methods of Dragging Tool with “diagram.currentTool.doCancel()” and it worked for me.

doMouseUp() and doCancel() methods of dragging tool causing the problem to throw error. So I replaced them with “diagram.currentTool.doCancel()”