Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach DevTools Tree keyboard events to the Tree container (not the document) #24164

Merged
merged 1 commit into from
Mar 25, 2022

Commits on Mar 25, 2022

  1. Attach DevTools Tree keyboard events to the Tree container (not the d…

    …ocument)
    
    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.
    Brian Vaughn committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    1ca506f View commit details
    Browse the repository at this point in the history