Can't cancel an external item from being dragged by pressing 'Esc' key
Subject of the issue
As a user I want to cancel Drag&Drop of a new item from outside the grid by pressing 'Esc' key while the item is being dragged. This works fine for items that are already inside the grid.
Your environment
- Gridstack demo page
- Google Chrome
Steps to reproduce
Just drag an external item and press 'Esc' key while dragging
Expected behavior
Dragging action should be cancelled, or if not possible at least handle the error.
I added 'Esc' key as an addition to a user paying for the 'r' feature, but I'm not planning to add more options to it (like dragging from outside, which ideally would work too) unless someone wants to donate for it.
I created a PR where I prevent throwing the error when n.grid is undefined, you can check it out
https://github.com/gridstack/gridstack.js/pull/2698
fixed in next release. don't forget to donate if you find this lib useful!