-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Table display “flickers” when refreshing the page #7219
Comments
Thanks for reporting. You could help us figure out what is going on by removing things from your projects that are not needed to reproduce the effect. The minimal reproduction page suggests starting from the other end by producing a new project and then adding things in until the effect is observed. |
Hi, Clean demo updated. |
I don't observe the flickering in Firefox but I can see it in Chrome and Safari. It also seems to be worse when the Developer Tools are open. Not entirely sure this is caused by Material? Btw,. please follow the instructions for the minimal reproduction as the info plugin also records the version number of Material used and runs various checks. |
Sorry, Firefox I didn't test it carefully, I just confirmed it and it does look fine on Firefox. Looking forward to your fixed version. |
Sorry, just confirmed, this issue doesn't seem to be a problem with mkdocs-material, I found that the |
Thanks for reporting. The slight repositioning comes from the fixes that Material for MkDocs has to apply in the browser to make tables properly scrollable, which is implemented in JavaScript. If you turn JavaScript off in your browser, you can see that the jittering stops. It could be fixed, if and only if the tables extension would create the necessary markup from the start. Providing a wrapper element should be easy to implement in the tables extension – I recommend raising this as a potential feature request to Python Markdown, in order to allow for improving mobile user experience: <div class="table">
<div class="table-wrapper">
...
</div>
</div> The extension could hide it behind a feature flag, so it's downward compatible: markdown_extensions:
- tables:
use_wrapper: true This is what Material for MkDocs currently needs to do: mkdocs-material/src/templates/assets/javascripts/templates/table/index.tsx Lines 29 to 44 in 2412a1b
Without this fix, large tables would break the layout on mobile and overflow. |
I retried it and found something, I recorded a video that you can watch, hopefully it will help with the Kapture.2024-05-29.at.19.58.09.mp4 |
Thanks for sharing! We'll check it out |
Context
No response
Bug description
Table display “flickers” when refreshing the page.
Kapture.2024-05-28.at.21.16.45.mp4
Related links
Reproduction
mkdocs-demo.zip
Steps to reproduce
refreshing page
Browser
Chrome, Safari, Edge, Firefox
Before submitting
The text was updated successfully, but these errors were encountered: