Skip to content

Commit 128620c

Browse files
committed
Always reparse in-editor marks when their DOM is dirty
FIX: Fix a bug where marks rendered with nested elements would in some situations suppress new input. Issue ProseMirror/prosemirror#1232
1 parent d705a47 commit 128620c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/viewdesc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,10 @@ class MarkViewDesc extends ViewDesc {
578578
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom)
579579
}
580580

581-
parseRule() { return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM} }
581+
parseRule() {
582+
if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView) return null
583+
return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM}
584+
}
582585

583586
matchesMark(mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark) }
584587

0 commit comments

Comments
 (0)