mirror of
https://github.com/marktext/marktext.git
synced 2025-05-09 05:41:31 +08:00
parent
070ef96b7a
commit
68e4a9ce7e
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user