之前在 github 上提交过这个 issue,但是有几个月没动静了,所以想发个帖子问下神通广大的家人们:
在反向链接编辑面板中新建列表项并立刻缩进至父级会导致列表项重复 · Issue #12256 · siyuan-note/siyuan
复制粘贴过来的 issue 内容:
Is there an existing issue for this?
- I have searched the existing issues
Can the issue be reproduced with the default theme (daylight/midnight)?
- I was able to reproduce the issue with the default theme
Could the issue be due to extensions?
- I've ruled out the possibility that the extension is causing the problem.
Describe the problem
Windows11,思源笔记 3.1.3 桌面应用,纯净无插件,新建空间和笔记本,无其他数据内容
新建测试页面和引用页面,在引用页面中书写对测试页面的引用和无序列表,在测试页面的反链编辑面板中,最初呈现:
创建一个和子列表项同级的空列表项并立刻 Shift Tab 向父级缩进后,会出现两个重复的空列表项:
这两个列表项的内容是镜像的,编辑其中一个,另一个会立即随之更新:
刷新反链面板后,重复的列表项会消失:
但如果在创建一个和子列表项同级的空列表项后,并不是立刻 Shift Tab 向父级缩进,而是等待一会再缩进,就不会出现上述重复的问题
上述的“父列表项“在传递型双链的直接子级,但无论是“父列表项“在更深的层级,还是这个引用属于关联型双链,亦或是有序列表,都会有问题出现
Expected result
新建子列表项并立刻缩进这种操作常用于新建一个和父列表项同级的列表项
该操作在反链编辑面板中应当能正常进行,就如同正常的文档编辑面板一样,而不是出现重复列表项的问题
Screenshot or screen recording presentation
上述内容中已经有图片说明
Version environment
- Version: 3.1.3 - Operating System: Windows11
Log file
I 2024/08/15 14:45:58 working.go:147:
___ ___ ___ ___
/ /\ ___ ___ //\ / /\ //
/ /:/_ / /\ //| \ :\ / /::\ \ :
/ /:/ /\ / /:/ | |:| \ :\ / /:/:\ \ :
/ /:/ /::\ //::\ | |:| ___ \ :\ / /://::\ __:/:/ \ :/\ //::::\ \ :\ / /:/ \ :/:// \ :~
//:/ /:/:\ _/:_ ||:| //\ __:\ /*/:/ /:/:\ /*_/::::::::
\ :/:/~/
\ ::/ /:/ _::/ ~:\ \ :\ /:/ \ ::/ \ :\ ~~~
_/ /:/ //:/ \ :\ \ :/:/ \ :\ \ :
//:/ _/ _/ \ ::/ \ :\ \ :
_/ _/ _/ _/
I 2024/08/15 14:45:58 runtime.go:74: kernel is booting:
* ver [3.1.3]
* arch [amd64]
* os [Microsoft Windows 11 Home China]
* pid [16244]
* runtime mode [prod]
* working directory [C:\Users\dsun\AppData\Local\Programs\SiYuan\resources]
* read only [false]
* container [std]
* database [ver=20220501]
* workspace directory [C:\Users\dsun\SiYuan]
I 2024/08/15 14:45:58 conf.go:125: loaded conf [C:\Users\dsun\SiYuan\conf\conf.json]
I 2024/08/15 14:45:58 conf.go:286: upgraded from version [3.1.1] to [3.1.3]
I 2024/08/15 14:45:58 runtime.go:123: use network proxy [system]
I 2024/08/15 14:45:58 serve.go:127: kernel [pid=16244] http server [127.0.0.1:58457] is booting
I 2024/08/15 14:45:59 conf.go:838: database size [8.04 MB], tree/block count [0/0]
I 2024/08/15 14:45:59 working.go:193: kernel booted
I 2024/08/15 14:45:59 box.go:77: auto stat [trees=0, blocks=0, dataSize=52.98 kB, assetsSize=0 B]
I 2024/08/15 14:45:59 disk.go:33: disk usage [total=215.06 GB, used=95.81 GB, free=119.25 GB]
I 2024/08/15 14:45:59 fixedport.go:35: fixed port service [127.0.0.1:6806] is running
I 2024/08/15 14:45:59 pandoc.go:146: built-in pandoc [ver=3.1.1, bin=C:\Users\dsun\SiYuan\temp\pandoc\bin\pandoc.exe]
I 2024/08/15 14:45:59 conf.go:1100: pandoc initialized, set pandoc bin to [C:\Users\dsun\SiYuan\temp\pandoc\bin\pandoc.exe]
I 2024/08/15 14:46:19 mount.go:64: created box [20240815144619-hqooeiu]
I 2024/08/15 14:46:19 index.go:220: rebuilt database for notebook [20240815144619-hqooeiu] in [0.02s], tree [count=0, size=0 B]
I 2024/08/15 14:46:19 index.go:290: resolved refs [0] in [2ms]
W 2024/08/15 15:03:17 tree.go:218: block tree not found [id=20240815150316-dlue03a], stack: [ github.com/siyuan-note/siyuan/kernel/model.LoadTreeByBlockID({0xc001492150, 0x16})
D:/88250/siyuan/kernel/model/tree.go:218 +0x6d
github.com/siyuan-note/siyuan/kernel/model.BuildBlockBreadcrumb({0xc001492150, 0x16}, {0x0, 0x0, 0x0})
D:/88250/siyuan/kernel/model/blockinfo.go:329 +0x30
github.com/siyuan-note/siyuan/kernel/api.getBlockBreadcrumb(0xc000b36200)
D:/88250/siyuan/kernel/api/block.go:451 +0x19a
]
More information
类似的 bug:当父列表项已经存在子列表项时,光标置于父列表项末,Enter 创建空的子列表项,再两次 Backspace 删除子列表项,列表中会再次闪出空的子列表项然后又消失,但最终对内容没有影响
类似的问题可能还有一些,总得来说,对反链面板中的列表项进行编辑,尤其是涉及到父子级的列表项时,都有可能出现问题
本人水平有限,如有陈述不妥,敬请谅解
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于