Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jan 13, 2026

Stacked on #35503

If you click outside a React root in the Elements panel, we want to give eedback that no selection is possible so we clear the selection. Otherwise clicking outside a React root is indistinguishable from clicking a different host node that leads to the same selected React element due to Component filters.

Test plan

  1. Open a document where not all DOM nodes are rendered by React e.g. https://react.new/
  2. Select a DOM node owned by React
  3. Select a DOM node not owned by React
CleanShot.2026-01-13.at.19.22.50.mp4
  1. Open a document where not all DOM nodes are rendered by React e.g. https://react.new/
  2. Open Components panel
  3. inspect element
  4. Open Elements panel (should clear inspection since the selected host node is not owned by React)
CleanShot.2026-01-13.at.20.02.00.mp4

@meta-cla meta-cla bot added the CLA Signed label Jan 13, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jan 13, 2026
@eps1lon eps1lon changed the title [DevTools] Add React Element pane to browser Elements panel [DevTools] Clear element inspection if host element not owned by any renderer is selected Jan 13, 2026
@eps1lon eps1lon marked this pull request as ready for review January 13, 2026 19:08
@eps1lon eps1lon force-pushed the sebbie/01-13-_devtools_clear_element_inspection_if_host_element_not_owned_by_any_renderer_is_selected branch from 48bb909 to a02311d Compare January 15, 2026 12:51
@eps1lon eps1lon requested a review from hoxyq January 15, 2026 17:07
@eps1lon eps1lon force-pushed the sebbie/01-13-_devtools_clear_element_inspection_if_host_element_not_owned_by_any_renderer_is_selected branch from a02311d to d6544ff Compare January 16, 2026 12:10
@eps1lon eps1lon force-pushed the sebbie/01-13-_devtools_clear_element_inspection_if_host_element_not_owned_by_any_renderer_is_selected branch from d6544ff to fb80c19 Compare January 16, 2026 12:12
@eps1lon eps1lon merged commit 01c4d03 into facebook:main Jan 16, 2026
234 checks passed
@eps1lon eps1lon deleted the sebbie/01-13-_devtools_clear_element_inspection_if_host_element_not_owned_by_any_renderer_is_selected branch January 16, 2026 12:22
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jan 18, 2026
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jan 18, 2026
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