mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
🐛 导出预览模式点击块引转换后的脚注跳转不正确 Fix https://github.com/siyuan-note/siyuan/issues/5700
This commit is contained in:
parent
6e754ef190
commit
02c2c529bd
1 changed files with 8 additions and 0 deletions
|
|
@ -37,6 +37,14 @@ export class Preview {
|
|||
previewElement.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
|
||||
if (event.target.tagName === "A") {
|
||||
const linkAddress = event.target.getAttribute("href");
|
||||
if (linkAddress.startsWith("#")) {
|
||||
// 导出预览模式点击块引转换后的脚注跳转不正确 https://github.com/siyuan-note/siyuan/issues/5700
|
||||
// 对于超链接锚点不做任何处理
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return
|
||||
}
|
||||
|
||||
if (isMobile()) {
|
||||
openByMobile(linkAddress);
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue