moveable
moveable copied to clipboard
Uncaught TypeError: Cannot set properties of null (setting 'dist')
Environments
- Framework name: vue3-moveable
- Framework version: 0.26.1
- Moveable Component version: 0.51.1
- Testable Address(optional):
Description
When the keyboard request function attempts to move the element, the keyboard does not release, switches the selected element, and the console reports this error. But I want the new element to move after I switch the selection element.
I printed a log in the unset method in the source code and found that calling unset a setTimeout asynchronous.
@daybrush
@d2461379109
Could you tell me the code of how you used the request
method with the keyboard event?
@d2461379109
Would you like to wait for the target to change and try it? (.waitToChangeTarget
)
// setTargets("???")
targetsRef.current = [];
// next call request
moveable.waitToChangeTarget().then(() => {
moveable.request(...);
});
- -Yes, that's OK, thanks!