This commit is contained in:
Ran Luo 2019-11-02 22:50:38 +08:00 committed by Felix Häusler
parent 070ef96b7a
commit 68e4a9ce7e
2 changed files with 15 additions and 3 deletions

View File

@ -500,10 +500,14 @@ const backspaceCtrl = ContentState => {
start: { key, offset },
end: { key, offset }
}
if (this.isCollapse()) {
let needRenderAll = false
if (this.isCollapse() && preBlock.type === 'span' && preBlock.functionType === 'paragraphContent') {
this.checkInlineUpdate(preBlock)
needRenderAll = true
}
this.partialRender()
needRenderAll ? this.render() : this.partialRender()
}
}
}

View File

@ -418,6 +418,7 @@ const enterCtrl = ContentState => {
}
this.insertAfter(newBlock, block)
break
}
case left === 0 && right === 0: {
@ -511,7 +512,14 @@ const enterCtrl = ContentState => {
end: { key, offset }
}
this.partialRender()
let needRenderAll = false
if (this.isCollapse() && cursorBlock.type === 'p') {
this.checkInlineUpdate(cursorBlock.children[0])
needRenderAll = true
}
needRenderAll ? this.render() : this.partialRender()
}
}