Skip to content

fix: restore search by keeping hidden search-button element in DOM#105

Merged
neuromechanist merged 1 commit intomasterfrom
fix/restore-search-functionality
Feb 14, 2026
Merged

fix: restore search by keeping hidden search-button element in DOM#105
neuromechanist merged 1 commit intomasterfrom
fix/restore-search-functionality

Conversation

@neuromechanist
Copy link
Copy Markdown
Member

Summary

  • The just-the-docs.js initNav() function calls jtd.addEvent on the #search-button element unconditionally. When the element was removed in commit 9a6c338 (to avoid overlap with the OSA chat widget), jtd.addEvent(null, ...) threw an error, which prevented initSearch() from executing. The lunr search index was never built, leaving the header search input non-functional.
  • Restores the #search-button element with display:none so the JS initializes without error while keeping the button invisible (no overlap with the chat widget).

Test plan

  • Verified on live site by injecting hidden button element and re-loading JS; search results appeared correctly
  • After deploy, confirm search field at top of page returns results when typing a query (e.g. "ICA")
  • Confirm OSA chat widget in bottom-right does not overlap with anything

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.
@neuromechanist neuromechanist merged commit 45cd711 into master Feb 14, 2026
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.

1 participant