Skip to content

[DevTools] Use documentElement to override cmd+F#34734

Merged
hoxyq merged 1 commit into
facebook:mainfrom
sebmarkbage:cmdf
Oct 5, 2025
Merged

[DevTools] Use documentElement to override cmd+F#34734
hoxyq merged 1 commit into
facebook:mainfrom
sebmarkbage:cmdf

Conversation

@sebmarkbage
Copy link
Copy Markdown
Contributor

We override Cmd+F to jump to our search input instead of searching through the HTML. This is ofc critical since our view virtualized.

However, Chrome DevTools installs its own listener on the document as well (in the bubble phase) so if we prevent it at the document level it's too late and it ends up stealing the focus instead. If we instead listen at the documentElement it works as intended.

@hoxyq hoxyq merged commit 0e79784 into facebook:main Oct 5, 2025
240 of 241 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants