Skip to content

fix: Decoration plugin appendTransaction throw RangeError when resolve - #237

Open
clumsyme wants to merge 1 commit into
bytedance:masterfrom
clumsyme:master
Open

fix: Decoration plugin appendTransaction throw RangeError when resolve#237
clumsyme wants to merge 1 commit into
bytedance:masterfrom
clumsyme:master

Conversation

@clumsyme

Copy link
Copy Markdown

decoration.from should not be greater than tr.doc.content.size, which is tr.doc.nodeSize - 2.
Otherwise, tr.doc.resolve(decoration.from) will throw RangeError.

This fixes #226 ,where decoration.from is 3 and tr.doc.nodeSize is 4 after deleting all content.

@clumsyme

Copy link
Copy Markdown
Author

@bradwang95 辛苦有空看下修复下这个 bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]使用shadow后,如果第一行只有一个字,全选后删除会报错

2 participants