Skip to content

fix(react): hydrate search on idle for keyboard shortcuts - #1062

Open
LitoMore wants to merge 1 commit into
nodejs:mainfrom
LitoMore:fix-cmd-k
Open

fix(react): hydrate search on idle for keyboard shortcuts#1062
LitoMore wants to merge 1 commit into
nodejs:mainfrom
LitoMore:fix-cmd-k

Conversation

@LitoMore

@LitoMore LitoMore commented Sep 1, 2026

Copy link
Copy Markdown

Description

This PR fixes the Cmd/Ctrl+K for the Beta Docs page https://beta.docs.nodejs.org.

The search box currently hydrates only after pointerover, focusin, or touchstart. As a result, the Cmd/Ctrl+K listener is not registered until the user interacts with the search button, so the shortcut can appear to work intermittently.

Hydrate the search box on idle instead, allowing the shortcut to work without requiring prior interaction. The Orama database remains lazy-loaded until the first search.

Validation

Open the Beta Docs page, and press the Cmd/Ctrl+K immediately. Nothing should have happened until you pointerover/focusin/touchstart the search box.

Related Issues

None

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format:check & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@LitoMore
LitoMore requested a review from a team as a code owner September 1, 2026 14:01
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Sep 1, 2026 2:03pm UTC

Request Review

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.

4 participants