fix: restore search by keeping hidden search-button element in DOM#105
Merged
neuromechanist merged 1 commit intomasterfrom Feb 14, 2026
Merged
fix: restore search by keeping hidden search-button element in DOM#105neuromechanist merged 1 commit intomasterfrom
neuromechanist merged 1 commit intomasterfrom
Conversation
The just-the-docs.js initNav() calls jtd.addEvent on the #search-button element unconditionally. When the element was removed (to avoid overlap with the OSA chat widget), jtd.addEvent(null, ...) threw an error, preventing initSearch() from ever executing. The search index was never built, leaving the header search input non-functional. Restore the button with display:none so the JS doesn't crash while keeping it invisible to avoid overlap with the chat widget.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
just-the-docs.jsinitNav()function callsjtd.addEventon the#search-buttonelement unconditionally. When the element was removed in commit 9a6c338 (to avoid overlap with the OSA chat widget),jtd.addEvent(null, ...)threw an error, which preventedinitSearch()from executing. The lunr search index was never built, leaving the header search input non-functional.#search-buttonelement withdisplay:noneso the JS initializes without error while keeping the button invisible (no overlap with the chat widget).Test plan