Merge pull request #146 from fantasticit/fix/drag

This commit is contained in:
fantasticit 2022-08-05 17:46:04 +08:00 committed by GitHub
commit fa41a96975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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();
}, },
}; };