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

Bug: React dev tools inspect element of hover does not work on shadow elements #26200

Closed
Biki-das opened this issue Feb 19, 2023 · 7 comments · Fixed by #26888
Closed

Bug: React dev tools inspect element of hover does not work on shadow elements #26200

Biki-das opened this issue Feb 19, 2023 · 7 comments · Fixed by #26888
Labels
Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@Biki-das
Copy link
Contributor

Biki-das commented Feb 19, 2023

Using react while making a shadow DOM and then using react devtools inspect element feature does not work as expected video and codesandbox below

sandboxLink
https://stackblitz.com/edit/react-zqp67t?file=src/App.js

while attaching shadowroot

Mozilla.Firefox.2023-02-19.21-52-16.mp4

without attaching root

Mozilla.Firefox.2023-02-19.21-53-37.mp4
@Biki-das Biki-das added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Feb 19, 2023
@Biki-das
Copy link
Contributor Author

Biki-das commented Feb 19, 2023

@lunaruan could you guide me towards how to build the dev tools locally and test it with the changes after making? i have some idea to work on this problem

cc @mondaychen

@mondaychen
Copy link
Contributor

To begin with, please follow https://github.com/facebook/react/blob/main/packages/react-devtools/CONTRIBUTING.md
Let me know if you have questions

@Biki-das
Copy link
Contributor Author

@mondaychen still kinda confused say i want to test the devtools changes locally within a react app how should i do so?

@mondaychen
Copy link
Contributor

@Biki-das if it's not extension specific, you can start the inline devtools server in react-devtools-inline, then start the shell in react-devtools-shell. Then you can test your changes with the shell UI. The guide:
https://github.com/facebook/react/blob/main/packages/react-devtools/CONTRIBUTING.md#option-1-fastest-using-the-test-shell

@Biki-das
Copy link
Contributor Author

@mondaychen it's extension specific

@mondaychen
Copy link
Contributor

Then you go to react-devtools-extensions and run yarn:build:chrome to build it.

Can you read through the guide I sent you fist? Everything I'm talking about now is on it.

@Biki-das
Copy link
Contributor Author

@mondaychen getting this errors while trying to run the extension anything i might be doing wrong?
bikid476@DESKTOP-16A0D3T_ ~_react-1_packages_react-devtools-shell 3_26_2023 8_26_17 PM

hoxyq pushed a commit that referenced this issue Jun 7, 2023
Fixes #26200 

### PR explanation

I tried to induce the change by the `event.composed` to check whether
the event was created in a ShadowRoot, And replaced `pointerOver` with
`pointerMove`, pointerOver event did not fired correctly

Before PR:-


https://github.com/facebook/react/assets/72331432/67a33dcd-447f-4c68-9c3c-ad954baddeb8

After PR:-


https://github.com/facebook/react/assets/72331432/9f986ff2-785f-4cba-a504-44f82ea9fc5a

---------

Co-authored-by: Biki das <bikidas@Bikis-MacBook-Pro.local>
EdisonVan pushed a commit to EdisonVan/react that referenced this issue Apr 15, 2024
Fixes facebook#26200 

### PR explanation

I tried to induce the change by the `event.composed` to check whether
the event was created in a ShadowRoot, And replaced `pointerOver` with
`pointerMove`, pointerOver event did not fired correctly

Before PR:-


https://github.com/facebook/react/assets/72331432/67a33dcd-447f-4c68-9c3c-ad954baddeb8

After PR:-


https://github.com/facebook/react/assets/72331432/9f986ff2-785f-4cba-a504-44f82ea9fc5a

---------

Co-authored-by: Biki das <bikidas@Bikis-MacBook-Pro.local>
bigfootjon pushed a commit that referenced this issue Apr 18, 2024
Fixes #26200

### PR explanation

I tried to induce the change by the `event.composed` to check whether
the event was created in a ShadowRoot, And replaced `pointerOver` with
`pointerMove`, pointerOver event did not fired correctly

Before PR:-

https://github.com/facebook/react/assets/72331432/67a33dcd-447f-4c68-9c3c-ad954baddeb8

After PR:-

https://github.com/facebook/react/assets/72331432/9f986ff2-785f-4cba-a504-44f82ea9fc5a

---------

Co-authored-by: Biki das <bikidas@Bikis-MacBook-Pro.local>

DiffTrain build for commit 9100456.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants