mirror of
https://github.com/facebook/react.git
synced 2026-02-24 04:33:04 +00:00
We used to listen to at the document level for this event. That allowed us to listen to up/down arrow key events while another section of DevTools (like the search input) was focused. This was a minor UX positive. (We had to use ownerDocument rather than document for this, because the DevTools extension renders the Components and Profiler tabs into portals.) This approach caused a problem though: it meant that a react-devtools-inline instance could steal (and prevent/block) keyboard events from other JavaScript on the page– which could even include other react-devtools-inline instances. This is a potential major UX negative. Given the above trade offs, we now listen on the root of the Tree itself.
This directory contains code shared between several DevTools packages:
- /packages/react-devtools-core
- /packages/react-devtools-extensions
- /packages/react-devtools-inline
It is not published or released anywhere directly.