Skip to content

代码块移动光标 ↑ 跳过问题 #5498

Closed
@wkmyws

Description

@wkmyws

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

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

描述问题 Describe the problem

有一个标题与两个代码块:


标题1

code1

code2

可以用于复现的markdown如下:

### 标题1

```bash
code1

```

```bash
code2
```

问题

当指针初始位置在code1中时,按方向键的↓移动到第二个代码块,一切正常

但当指针从第二个代码块code2中,按方向键的↑,预期移动到第一个代码块时,指针却直接跳到了标题1处

我觉得问题出在code1是以换行符结尾的,当把code1第二行删除时,此bug没有复现

期待的结果 Expected result

指针正常跳转

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

https://github.com/wkmyws/issues_demo/blob/main/siyuannote%201.wmv

版本环境 Version environment

- Version: v2.1.1
- Operating System: ubuntu docker
- Browser (if used): chrome

日志文件 Log file

null

更多信息 More information

Activity

88250

88250 commented on Jul 24, 2022

@88250
Member

我这里使用 v2.1.2 重现不了,请升级以后再试试。

issue

wkmyws

wkmyws commented on Jul 24, 2022

@wkmyws
Author

https://github.com/wkmyws/issues_demo/blob/main/siyuan%20note%202.wmv

我想你这个baz是文章的大标题,你在大标题下面换行建立一个三级标题### title试试

如上面这个视频所示,当建立一个三级标题+代码块时,bug是会出现的,

而如果用大标题+代码块,就一切正常

reopened this on Jul 24, 2022
88250

88250 commented on Jul 24, 2022

@88250
Member

没有重现哦

issue

wkmyws

wkmyws commented on Jul 24, 2022

@wkmyws
Author

那麻烦试下,把第一个代码块的第二行的”bar“字符删除,只保留换行符呢?

88250

88250 commented on Jul 24, 2022

@88250
Member

确实可以重现了,感谢感谢。

changed the title [-]代码块的切换逻辑存在问题[/-] [+]代码块移动光标 ↑ 跳过问题[/+] on Jul 24, 2022
added this to the 2.1.3 milestone on Jul 24, 2022
wkmyws

wkmyws commented on Jul 24, 2022

@wkmyws
Author

好的好的,作者辛苦了!

added a commit that references this issue on Sep 27, 2024
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@wkmyws

      Issue actions

        代码块移动光标 ↑ 跳过问题 · Issue #5498 · siyuan-note/siyuan