Strg+Drag-Copy - Error on Drag-End when Strg is pressed, but not recognized as copy

Hi,

we encountered an error in our Application, which originated in the DraggingTool Code and is reproducible on the GOJS Website Examples.

For example here: Interactive Diagram for Building Flowcharts | GoJS Diagramming Library*

Steps:

  1. Select node
  2. Drag node
  3. Press Strg (a copy of the node appears at the original location)
  4. Release Strg
  5. Press Strg (NO copy appears)
  6. Release mouse-dragging

I get the following error in the console:

Uncaught TypeError: Cannot read properties of null (reading 'toKeySet')
    at DraggingTool.doMouseUp (go.js:11:35736)
    at Diagram.doMouseUp (go.js:13:7597)
    at xM.i.ra (go.js:13:5698)

This error crashes our application and is rather unintuitive to debug.
What can we do to stop this from happening?
It seems like a bug somewhere in the STRG+Drag interaction.

Cheers,
Niklas

This bug only happens when not moving the mouse after step 5.

Thanks for reporting this – we’ll investigate.

This will be fixed in 3.0.18, which we should be releasing next week.

Hello walter, we are still on 2.2. Will there also be a fix for that version?

No, but I can look into putting it into the 2.3 branch.

Any news regarding a hotfix in 2.3?

A “hotfix”? Could I just give you a new go.js file? Or do you need an ES module file?

We’re using gojs v2.2.23 via npm.
I would prefer not having to distribute a special version internally, but to update to a fixed and published version on npm.
We have a few roadblocks to clear before updating to v3 so a patch for a v2.x Version would be nice.

I’m curious what your roadblocks are with upgrading to v3.
The fixes are already checked-in; I’ll ask about doing a release.

Regarding roadblocks: Last time I checked we had some problems with images not showing in the go.Palette on iOS.
I haven’t had the time to analyze this, so I don’t have any further information.

2.3.19 has been released, and is available via npm.

npm i [email protected]
or
npm i gojs@twothree

https://gojs.net/2.3.19/changelog.html
https://gojs.net/2.3.19/download.html

Thanks for the patch-release for 2.3.
Fixed the problem for us.