mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
fix: 修复大文档锚点跳转预览滚动位置不正确问题
This commit is contained in:
@@ -55,6 +55,7 @@ const handleLink = (link: HTMLAnchorElement) => {
|
||||
document.getElementById(encodeURIComponent(hash.replace(/^h-/, '')))
|
||||
|
||||
if (el) {
|
||||
await sleep(0)
|
||||
el.scrollIntoView()
|
||||
|
||||
// 如果是标题的话,也顺便将编辑器滚动到可视区域
|
||||
|
||||
Reference in New Issue
Block a user