Skip to content

fix: update sidebar anchor activation logic - #2779

Open
sy-records wants to merge 1 commit into
docsifyjs:developfrom
sy-records:fix/search
Open

fix: update sidebar anchor activation logic#2779
sy-records wants to merge 1 commit into
docsifyjs:developfrom
sy-records:fix/search

Conversation

@sy-records

Copy link
Copy Markdown
Member

Summary

When using the search function, the highlighted anchor in the sidebar does not update after clicking.

Related issue, if any:

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

  • Yes
  • No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@sy-records is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

@sy-records
sy-records requested review from a team and paulhibbitts August 6, 2026 02:50
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docsify-preview Ready Ready Preview Aug 6, 2026 2:52am

@paulhibbitts

Copy link
Copy Markdown
Member

Thanks very much @sy-records ! I am not quite sure of the needed flow to manually test this fix, I tried this but both docsify.js.org and PR Preview build seem to give the same results?

  1. View docsify.js.org and the PR Preview build
  2. Click on Sidebar item Configuration
  3. Click in Search box
  4. Enter "HTML" and press return
  5. Click on Showcase in search results

Can you provide more details on what an example test flow would be? Thank you!

@sy-records

Copy link
Copy Markdown
Member Author

The content of showcase is a remote file, so it may not be loaded.

You can search for the contents of local files, such as configuration items.

@paulhibbitts paulhibbitts left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification @sy-records . Here is my manual test flow:

  1. Click a sidebar item (e.g. Quick start)
  2. Search "html", click the first result
  3. Click the 脳 clear button on the search box to dismiss results

On https://docsify.js.org/ "Quick start" loses its highlight, and as intended the new PR Build Preview HTML remains highlighted. Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants