Skip to content

Browser search finds sidebar text when it is hidden #2721

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

Open
ehuss opened this issue May 31, 2025 · 1 comment · May be fixed by #2725
Open

Browser search finds sidebar text when it is hidden #2721

ehuss opened this issue May 31, 2025 · 1 comment · May be fixed by #2725
Labels
A-browser Area: Browser support (compatibility, etc.) C-bug Category: A bug, incorrect or unintended behavior E-Help-wanted Experience: Help Needed

Comments

@ehuss
Copy link
Contributor

ehuss commented May 31, 2025

Problem

When the sidebar is collapsed (hidden), using the browser's native search will find the hidden words in the sidebar. This is a little confusing because you cannot see the words. This also doesn't seem to be a problem on other sides with a sidebar that collapses. I'm not sure why this is happening.

Steps

  1. Go to https://rust-lang.github.io/mdBook/
  2. Collapse the sidebar
  3. Use your browser's "Find" command and search for "installation" and notice that it seems to find this word even though it isn't visible on the page.

This seems to happen with Firefox, Chrome, and Safari.

Possible Solution(s)

No response

Notes

No response

Version

mdbook v0.4.51
@ehuss ehuss added C-bug Category: A bug, incorrect or unintended behavior E-Help-wanted Experience: Help Needed A-browser Area: Browser support (compatibility, etc.) labels May 31, 2025
@GuillaumeGomez
Copy link
Member

It's because the sidebar is not hidden, just moved out of the viewport. I'll send a fix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-browser Area: Browser support (compatibility, etc.) C-bug Category: A bug, incorrect or unintended behavior E-Help-wanted Experience: Help Needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants