Skip to content

光标位于列表项末尾的行内公式后时回车表现异常 #6679

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

思源笔记-bug反馈-43

  • 光标位于末尾非行内公式的列表项的尾部回车
    • 可以看到在下级列表首插入了一个空的列表项
  • 光标位于末尾行内公式的列表项的尾部回车
  • 可以看到在同级列表中插入了一个看起来是空的列表项, 实际是在列表块中插入了一个非法的段落块(而非列表项块), 因此继续编辑会造成运行时异常并重建索引

正常情况(在下级列表块首插入一个列表项)

<div data-marker="*" data-subtype="u" data-node-id="20221122153441-7vufvri" data-type="NodeListItem" class="li">
    <div class="protyle-action" draggable="true"><svg>
            <use xlink:href="#iconDot"></use>
        </svg></div>
    <div data-node-id="20221122153441-d8pe8ck" data-type="NodeParagraph" class="p">
        <div contenteditable="true" spellcheck="false"></div>
        <div contenteditable="false" class="protyle-attr"></div>
    </div>
    <div class="protyle-attr" contenteditable="false"></div>
</div>

异常情况(在同级列表块中插入一个段落块)

<div data-node-id="20221122154024-ina1vqn" data-type="NodeParagraph" class="p">
    <div contenteditable="true" spellcheck="false">
    </div>
    <div contenteditable="false" class="protyle-attr"></div>
</div>

期待的结果 Expected result

光标位于行内公式末尾时回车与非嘿嘿你公式末尾回车一致

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

No response

版本环境 Version environment

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

日志文件 Log file

无有效信息输出

更多信息 More information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Vanessa219@Zuoqiu-Yingyi

      Issue actions

        光标位于列表项末尾的行内公式后时回车表现异常 · Issue #6679 · siyuan-note/siyuan