Skip to content

Commit

Permalink
Fix bug in composition tracking that could duplicate DOM content
Browse files Browse the repository at this point in the history
FIX: Fix an issue where a composition happening at the same time as widget
insertion/removal could corrupt the rendered DOM.

Closes ProseMirror/prosemirror#1289
  • Loading branch information
marijnh committed Jul 6, 2022
1 parent 58897b1 commit fd99e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viewdesc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ class ViewTreeUpdater {
if (child.dirty == NODE_DIRTY && child.dom == child.contentDOM) child.dirty = CONTENT_DIRTY
if (!child.update(node, outerDeco, innerDeco, view)) return false
this.destroyBetween(this.index, index)
this.index = index + 1
this.index++
return true
}

Expand Down

0 comments on commit fd99e6f

Please sign in to comment.