Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文目录树 点击无法跳转 #2260

Open
ioblog opened this issue Aug 11, 2021 · 5 comments
Open

中文目录树 点击无法跳转 #2260

ioblog opened this issue Aug 11, 2021 · 5 comments

Comments

@ioblog
Copy link

ioblog commented Aug 11, 2021

英文目录树正常,中文的目录树点击报错
post-details.js?v=5.1.4:76 Uncaught TypeError: Cannot read property 'top' of undefined
at HTMLAnchorElement. (post-details.js?v=5.1.4:76)
at HTMLAnchorElement.dispatch (index.js?v=2.1.3:3)
at HTMLAnchorElement.r.handle (index.js?v=2.1.3:3)

@DREAM-demo
Copy link

同问,而且按照网上说的改了post-details后本地链接虽然还是乱码,但是可以跳转……

@chenwingsing
Copy link

目前我解决了一级标题的跳转,但是二级的中文标题显示不出来。

@fge7s-7coin
Copy link

同文,如何解决这个问题
Uncaught TypeError: Cannot read properties of undefined (reading 'top')
at HTMLAnchorElement. (post-details.js?v=5.1.4:76)
at HTMLAnchorElement.dispatch (index.js?v=2.1.3:3)
at HTMLAnchorElement.r.handle (index.js?v=2.1.3:3)

@LauArmy
Copy link

LauArmy commented Dec 16, 2021 via email

@Lwenkun
Copy link

Lwenkun commented Mar 29, 2024

image 在 themes/next/source/js/utils.js 里添加这一行:
link.href = decodeURI(link.getAttribute('href'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants