-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Buggy header shadow #2488
Comments
Thanks for reporting! Unfortunately, I cannot reproduce your issue (on Chrome, macOS). It's all working as intended for me.
|
I found the code changing shadow state at src/assets/javascripts/components/header/_/index.ts, however I can't find any code checking whether tabs are used. Am I missing something? btw, the shadow in the link you shared also behaves buggy on my computer. |
Thanks for your response. Could you please specify what you mean by "buggy"? Even though the header shadow disappears in your video when the users scrolled to the top, I won't consider it being "buggy". Yes, the behavior might be slightly different depending on browser but everything seems to be behaving predictably. |
Whether the header is shown is determined based on the mkdocs-material/src/assets/javascripts/components/header/_/index.ts Lines 186 to 198 in 414ffe1
When mkdocs-material/src/assets/javascripts/components/main/index.ts Lines 105 to 124 in 414ffe1
|
By "buggy" I mean when the page is not scrolled, sometimes it shows the shadow sometimes it doesn't. Video: https://cloud.pegasis.site/s/DeS3se7o2Gt53d3 And on chrome android, it shows the shadow even if not scrolled. |
Okay, thanks for the explanation and the video, I can now reproduce it on the example versioning docs. I'd regard this as an edge case and a very minor bug, but I'll look into it when I find some time. |
I found the issue. There're actually 2 bugs.
I'm working on a pr. |
Fixed in f43ef69. I switched all computations to the rounded values, which should now always yield consistent results. Really good catch! |
Released as part of 7.0.7. |
I've found a bug and checked that ...
Description
Header shadow randomly appears when it shouldn't.
This affects almost every site using mkdocs-material, e.g. https://notes.pegas.is/, https://walkccc.me/LeetCode/
This affects both Chrome and Firefox.
However, the official documentation site doesn't seem to be affected. (probably due to it's announcement bar?)
Expected behavior
Header shadow only appears when the page is scrolled down.
Actual behavior
Video: https://cloud.pegasis.site/s/Q5H7LFWoKtWJHcd
Steps to reproduce the bug
It's so random that I can't give exact steps, try repeating those steps multiple times in different orders:
Package versions
3.9.2
1.1.2
7.0.6
Project configuration
System information
The text was updated successfully, but these errors were encountered: