mirror of https://github.com/fantasticit/think.git
tiptap: remove listener before destroy
This commit is contained in:
parent
bf4a3ec576
commit
c6f430a895
|
@ -108,6 +108,9 @@ export const Dragable = Extension.create({
|
||||||
destroy: () => {
|
destroy: () => {
|
||||||
if (!dragHandleDOM) return;
|
if (!dragHandleDOM) return;
|
||||||
|
|
||||||
|
dragHandleDOM.removeEventListener('mousedown', handleMouseDown);
|
||||||
|
dragHandleDOM.removeEventListener('mouseup', handleMouseUp);
|
||||||
|
dragHandleDOM.removeEventListener('dragstart', handleDragStart);
|
||||||
dragHandleDOM.remove();
|
dragHandleDOM.remove();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue