This work implements [DevTools Bug]: Inspect button does not work with top-layer elements like <dialog> (open)
Website or app
https://codesandbox.io/p/sandbox/ws7dp6
Repro steps
The Inspect button lets you lookup a component in the tree by clicking on it.
This is not working with top-layer elements, like <dialog> opened via showModal.
- Navigate to https://ws7dp6.csb.app/
- Open React Dev Tools > Components
- Click the Inspect button (there are two icons of a cursor inside a rectangle at the top left, the browser's built-in one works, the one in React Dev Tools does not)
- Click inside the dialog
- Notice that nothing is selected.
The issue is packages/react-devtools-shared/src/backend/views/Highlighter/Overlay.js:169 uses a really high z-index, instead of entering the top layer.
https://github.com/user-attachments/assets/3ea438f3-3362-4e37-9c81-8f9ffd0540b7
How often does this bug happen?
Every time
DevTools package (automated)
No response
DevTools version (automated)
No response
Error message (automated)
No response
Error call stack (automated)
Error component stack (automated)
GitHub query string (automated)
You've reached the end of this PR review
Thus concludes todayโs episode of โJust One Small Changeโ