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: fix upscrolling bug in chrome. See issue #313 #364

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gitduk
Copy link

@gitduk gitduk commented Jul 25, 2023

Modify the calculation method of topDistance.

gitduk added 2 commits July 7, 2023 16:12
fix: 外链图片无法正常显示
fix: 部分页面滚动到顶端 nav 不显示问题
Copy link

@cubicYYY cubicYYY left a comment

Choose a reason for hiding this comment

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

It won't work if the screen resolution is higher.
In my opinion it is better to do so:

- var topDistance = menu.offset().top;
+ var topDistance = document.documentElement.scrollTop;

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

Successfully merging this pull request may close these issues.

2 participants