moveable
moveable copied to clipboard
moveable.esm.js:2980 Uncaught TypeError: Cannot set properties of null (setting 'dist')
Environments
- Framework name:
- Framework version:
- Moveable Component version:
- Testable Address(optional):
Description
报错moveable.esm.js:2980 Uncaught TypeError: Cannot set properties of null (setting 'dist')是什么意思
@hqiaozhang
Can I know when it happens?
没有规律,就有时候点着点着就报这个错了 @daybrush
I had the same problem. When the keyboard request function moves the element, the keyboard does not mouseup, switches the selected element, and the console reports this error. But I want the new element to be able to move after switching the selection element. @daybrush
@hqiaozhang
I would like to know the moveable usage code at the time the error call stack occurred.
Does the target change when clicked or something like that?
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(...);
});
我开始点击产品报价那个元素移动了一下,然后又点击到了订单回款这个元素,就报Cannot set properties of null (setting 'dist')错误了 @daybrush