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

Page jumps away from content when toggling yaml/toml/json examples #272

Open
adrian5 opened this issue Aug 16, 2023 · 1 comment
Open

Page jumps away from content when toggling yaml/toml/json examples #272

adrian5 opened this issue Aug 16, 2023 · 1 comment
Labels

Comments

@adrian5
Copy link

adrian5 commented Aug 16, 2023

For example on configuration page in the configure minify section, when clicking on the json tab of the code snippets, the page jumps far enough away to lose context.

I assume this is because all snippets on the page change dimensions at once. I wonder if there's a better solution.

@bep bep added the bug label Aug 16, 2023
@bep
Copy link
Member

bep commented Aug 16, 2023

Yea, the problem happens I think when a toggle above which is in view changes height.

I have fixed something similar elsewhere, and the trick is to store away the scroll position and then adjust it after you change tab by calculating the diff in vertical position.

@jmooring jmooring transferred this issue from gohugoio/hugoDocs Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants