Skip to content

Source view has many scrollbars #2787

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

Closed
Alexendoo opened this issue Apr 5, 2025 · 5 comments · Fixed by #2796
Closed

Source view has many scrollbars #2787

Alexendoo opened this issue Apr 5, 2025 · 5 comments · Fixed by #2796
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug

Comments

@Alexendoo
Copy link
Member

e.g. on https://docs.rs/crate/cargo/latest/source/Cargo.toml.orig it's gathering quite the collection

Image

@syphar syphar added C-bug Category: This is a bug A-frontend Area: Web frontend labels Apr 7, 2025
@GuillaumeGomez
Copy link
Member

I can't reproduce the bug, which browser are you using?

@Alexendoo
Copy link
Member Author

Occurs on Chrome & Firefox. If you're on Firefox Linux you may need to enable the "always show scrollbars" setting as it can default to overlay scrollbars. I would guess it's similar on macOS

@Alexendoo
Copy link
Member Author

It's from setting overflow: scroll on #source-code-container and #source-code, the actual scrolling is happening in the code element so removing these should be fine. In browsers where the scrollbar takes up room in the document (is not an overlay) scroll forces them to be visible

#source-code-container {
display: inline-flex;
overflow: scroll;
}

#source-code {
overflow: scroll;
width: 100%;
}

@GuillaumeGomez
Copy link
Member

Wanna send a fix then maybe? You already seem to have the solution. 😉

@Alexendoo
Copy link
Member Author

I looked at https://github.com/rust-lang/docs.rs?tab=readme-ov-file#getting-started and went with a comment instead, but actually yeah since it works in the inspector I don't need to build a local version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants