1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 10:51:44 +02:00

fix void copying to attach to the right dom element

This commit is contained in:
Ian Storm Taylor
2017-05-04 15:55:24 -07:00
parent 75c76a6dea
commit 8208633091

View File

@@ -271,7 +271,7 @@ function Plugin(options = {}) {
const node = findDOMNode(isVoidBlock ? endBlock : endInline)
r.setEndAfter(node)
contents = r.cloneContents()
attach = node
attach = contents.childNodes[contents.childNodes.length - 1].firstChild
}
// Remove any zero-width space spans from the cloned DOM so that they don't