Hufe921/canvas-editor

在文档最后时向后删除元素错误

Closed this issue · 2 comments

version

0.9.79

Link to minimal reproduction

No response

Steps to reproduce

选中图片,按del键,无法删除。console 有错误

TypeError: Cannot read properties of undefined (reading 'control')
    at pr.spliceElementList (index.f2226bb5.js:84:137986)
    at so (index.f2226bb5.js:83:18273)
    at co (index.f2226bb5.js:83:26587)
    at Fo.keydown (index.f2226bb5.js:84:7609)
    at zs._keyDown (index.f2226bb5.js:83:2581)
    at n.onkeydown (index.f2226bb5.js:83:2284)

What is expected?

正常删除图片

What is actually happening?

未能删除

System Info

No response

Any additional comments?

No response

无法复现,发一下编辑器的数据,及详细操作步骤

选中图片,按del键现在没有出错了,但没有删除图片,而是错误删除了图片后面的内容。
https://hufe.club/canvas-editor/ 这里做的测试

bug

@Hufe921