Skip to content

在空的代码块中使用快捷键 Ctrl + A 选择并删除后出现异常 #6706

Closed
@Zuoqiu-Yingyi

Description

@Zuoqiu-Yingyi

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

描述问题 Describe the problem

复现步骤

  1. 新建一个文档
  2. 在一个空代码块前插入一个段落块
  3. 光标位于代码块中
  4. 使用快捷键 Ctrl + A 选择空代码块中的内容
  5. 使用按键 Backspace

下面是复现后的代码块对应的 DOM

<div data-node-id="20221124202721-0w54dvi" data-node-index="1" data-type="NodeCodeBlock" class="code-block" updated="20221124203147">
    <span contenteditable="false" class="protyle-linenumber__rows">
        <span></span>
    </span>
    <div class="protyle-attr" contenteditable="false">&ZeroWidthSpace;</div>
</div>

期待的结果 Expected result

空代码块中使用快捷键 Ctrl + A 后使用按键 Backspace 什么都不会发生

截屏或者录屏演示 Screenshot or screen recording presentation

image

版本环境 Version environment

- Version: 2.5.1
- Operating System: 
- Browser (if used):

日志文件 Log file

无有效内容输出

更多信息 More information

空代码块中使用快捷键 Ctrl + A 后使用按键 Backspace 继续编辑有高概率出现运行时异常

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@Zuoqiu-Yingyi

      Issue actions

        在空的代码块中使用快捷键 `Ctrl + A` 选择并删除后出现异常 · Issue #6706 · siyuan-note/siyuan