gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

dataTransfer is undefined (v6+ uses MouseEvent not DragEvent anymore)

Open ZOUJIELynn opened this issue 2 years ago • 4 comments

https://github.com/gridstack/gridstack.js/blob/5f6c8de638a2519fbc8ffc18171810671c4e3e93/demo/drag-and-drop-dataTransfer.html#L69

ZOUJIELynn avatar May 22 '23 02:05 ZOUJIELynn

that's a 21 months old demo that never been updated per say, nor is it actually published on the index list. No wonder why I didn't remember what it was... unlikely to be looked at anytime soon...

angular code likely very outdated along the rest. Unlike

SHA-1: f5ba6d59f49bd7822b323989dfeb59369949e270

* Enable passing of DragEvent to gridstack dropped event (#1841)

Modification done to allow the passing of DragEvent to gridstack dropped event, allowing access to dataTransfer property. A demo in Angular has been included to showcase this new capability.

Co-authored-by: Samuel Lim <[email protected]>

adumesny avatar May 25 '23 00:05 adumesny

thanks for your reply , any way for me to transfer data when drag a widget outside now ?

By the way , I use vue3 ~

ZOUJIELynn avatar May 25 '23 09:05 ZOUJIELynn

Any news?

EgorPopovPP avatar Dec 05 '23 11:12 EgorPopovPP

we are no longer using DragEvent since v6 but simple MouseEvent (and TouchEvents on mobile) so we don't get dataTransfer per say. suppose I could maybe create/fake it...

Why do you use it and couldn't the info be stored other ways anyway ?

image image

adumesny avatar Mar 30 '24 23:03 adumesny

closing since old and no updates, and not something we support.

adumesny avatar Jul 21 '24 15:07 adumesny