The position of the opened page sometimes does not end up at the desired hash position (though sometimes it works).
It's easier to reproduce if I scroll up and down the opened page a little bit, open a new tab, paste URL, and press enter again.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Additional context
I found that animation.js may have caused this issue. I made the following change on my own website:
Describe the bug When I uses a url with hash, e.g.
blog.com/article/#title
(generated by https://github.com/hexojs/hexo-renderer-markdown-it/#automatic-headline-ids) , I expect browser to open the link and jump to a position where the title is at top of the page. But the actual position is not.System and Environment The version and configuration of Hexo and Icarus.
hexo version
command to view these information): hexo-cli: 4.3.0; os: linux 5.15.64-1-lts Arch Linux; node: 14.20.0_config.yml
_config.icarus.yml
orthemes/icarus/_config.yml
_config.post.yml
, or_config.page.yml
)To Reproduce Steps to reproduce the behavior, such as:
The position of the opened page sometimes does not end up at the desired hash position (though sometimes it works). It's easier to reproduce if I scroll up and down the opened page a little bit, open a new tab, paste URL, and press enter again.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Additional context I found that
animation.js
may have caused this issue. I made the following change on my own website:Then I can get the expected behavior. However I don't understand the root cause.