You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.
Uncaught (in promise) TypeError: Cannot read property 'addEventListener' of undefined
I've confirmed that this occurs no matter the type of elements. It's present with both div and svg. Additionally, if the array has only a single element in it, this error does not occur.
Hi @dartanian300 👋
Thanks for your issue. Groups are not supported right now. Some work was done in v1.6.0 to make it work properly but it still needs testing
Any updates on when groups will be supported? I am having the same issue unfortunately. Digging into this package and moveable package to figure out why it's doing this. While debugging, it turns out that nextTarget is null because dragTarget and areaElement are both null -- this leads to the Uncaught (in promise) TypeError: Cannot read property 'addEventListener' of undefined error. This is in the updateEvent function for MoveableGroup in the Moveable package.
Finally figured out what the problem was. Boolean props have a default value of False. This was screwing everything up. I replaced every Boolean prop value from Boolean to {type: Boolean, required: false, default: undefined } in Moveable.vue component, and it worked! So I believe that's the fix that needs to be made in this package for groups to work.
Based on the Moveable documentation (found here: https://github.com/daybrush/moveable/blob/0.13.4/handbook/handbook.md#toc-group), you can create a group of moveable elements by passing an array to the
target
property. However, doing so in vue-moveable after initialization throws the following error:Uncaught (in promise) TypeError: Cannot read property 'addEventListener' of undefined
I've confirmed that this occurs no matter the type of elements. It's present with both
div
andsvg
. Additionally, if the array has only a single element in it, this error does not occur.Demo:
https://codesandbox.io/s/vue-moveable-group-problem-9r6sf?fontsize=14&hidenavigation=1&theme=dark
Vue-Moveable version: 1.4.0
The text was updated successfully, but these errors were encountered: