Cause: Happens sometimes when selecting a text node at the start of the paragraph and then clicking anywhere else in the editor.
Debugger result.
From deselectNode of clearNodeSelection :
function clearNodeSelection(view) {
if (view.lastSelectedViewDesc) {
if (view.lastSelectedViewDesc.parent) view.lastSelectedViewDesc.deselectNode();
view.lastSelectedViewDesc = undefined;
}
}
{
key: "deselectNode",
value: function deselectNode() {
if (this.nodeDOM.nodeType == 1) this.nodeDOM.classList.remove("ProseMirror-selectednode");
if (this.contentDOM || !this.node.type.spec.draggable) this.dom.removeAttribute("draggable");
}
}
In the above this.node.type.spec.draggable is undefined. this.dom is #text and doesn't have removeAttribute
Cause: Happens sometimes when selecting a text node at the start of the paragraph and then clicking anywhere else in the editor.
Debugger result. From deselectNode of clearNodeSelection :
In the above this.node.type.spec.draggable is undefined. this.dom is #text and doesn't have removeAttribute