-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
fix anchor link positioning #283
Conversation
Suppose we have an article: ```md # header1 any text... ![](img1.png) # header2 any text... ![](img2.png) # header3 any text... ![](img3.png) ``` Now we want to visitor the anchor link: `See also [header3](https://host/page#header3)`, which is very common in a document site. Because of the `lazysize.js`, the Browser cannot detect the real sizes of `img1`, `img2`: 1. The Browser scroll to `#header3` 1. `lazysize.js` runs, updates `img1`, `img2` 1. Updated `img1`, `img2` push the scroll position, users can not find the expected `#header3` title. Standard MarkDown syntax of image supports only one image, which means we don't need `lazysize.js` in most cases, this is what this PR does to fix anchor link positioning.
@qjebbs is attempting to deploy a commit to the FixIt Team on Vercel. A member of the Team first needs to authorize it. |
I'm also aware of this bug, your handling solves the problem, but also gives up the lazy loading feature of images. |
I want to use native lazy loading and remove |
I'm looking forward to it. Should I close this PR now? |
yes |
fixed via 934c57c, preview demo |
Confirmed to fix the issue, thanks! |
抱歉,似乎还有个小问题。 我的 baseURL: "/docs/" 即整个站点发布在 |
由于scss中传递hugo参数目前还需要额外的插件,现改为style中加载loading,你更新一下最新版本 |
是我草率了,没尝试最新的😂。 太感谢你了,回复超快的! |
Suppose we have an article:
Now we want to visitor the anchor link:
See also [header3](https://host/page#header3)
, which is very common in a document site.Because of the
lazysize.js
, the Browser cannot detect the real sizes ofimg1
,img2
:#header3
lazysize.js
runs, updatesimg1
,img2
img1
,img2
push the scroll position, users can not find the expected#header3
title.Standard MarkDown syntax of image supports only one image, which means we don't need
lazysize.js
in most cases, this is what this PR does to fix anchor link positioning.