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

fix: resolve the issue of anchor link positioning not being offset #229

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

SkyzcYou
Copy link
Contributor

@SkyzcYou SkyzcYou commented Dec 19, 2024

Close: #227

移除 tocbot 初始化配置中关于滚动相关的配置,交给浏览器原生行为处理。可以解决使用锚点链接定位未偏移问题。

已在测试如下3中场景,均可正常跳转偏移:

  • 直接通过URL访问带hash的链接
  • 点击页面内的锚点链接
  • 点击目录项
修复直接访问文章无法使用目录定位的问题。

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Dec 19, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from JohnNiang and wan92hen December 19, 2024 12:19
@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Dec 20, 2024
@ruibaby ruibaby changed the title Fix: Resolve the issue of anchor link positioning not being offset Fix: resolve the issue of anchor link positioning not being offset Dec 20, 2024
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Dec 20, 2024
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

感谢参与贡献,实际测试符合预期。

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Dec 20, 2024
Copy link

f2c-ci-robot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2024
@ruibaby ruibaby changed the title Fix: resolve the issue of anchor link positioning not being offset fix: resolve the issue of anchor link positioning not being offset Dec 20, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 85c360b into halo-dev:main Dec 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

锚点链接定位错误
2 participants