Closed
Description
该问题是否已经被报告过了? 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
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
88250 commentedon Jul 24, 2022
我这里使用 v2.1.2 重现不了,请升级以后再试试。
wkmyws commentedon Jul 24, 2022
https://github.com/wkmyws/issues_demo/blob/main/siyuan%20note%202.wmv
我想你这个
baz
是文章的大标题,你在大标题下面换行建立一个三级标题### title
试试如上面这个视频所示,当建立一个三级标题+代码块时,bug是会出现的,
而如果用大标题+代码块,就一切正常
88250 commentedon Jul 24, 2022
没有重现哦
wkmyws commentedon Jul 24, 2022
那麻烦试下,把第一个代码块的第二行的”bar“字符删除,只保留换行符呢?
88250 commentedon Jul 24, 2022
确实可以重现了,感谢感谢。
[-]代码块的切换逻辑存在问题[/-][+]代码块移动光标 ↑ 跳过问题[/+]wkmyws commentedon Jul 24, 2022
好的好的,作者辛苦了!
🐛 fix #5498
🐛 fix #5498
🎨 #5498