You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the inspector I can't get to the owner of nested component when hovering if the owner only contains the component.
Maybe it's supposed to be like that but I would like to be able to get to the owning component because I had set props there (not showing that in the repro example though).
In my real project I see
<!--<P>--><!--<OwningComponent>-->
in the devtools element list but maybe the inspector doesn't use those?
Hover over the text "I am nested". It takes you to P.svelte even though the text "I am nested" comes from NestingP.svelte
Hover over the text "Unless I do something like this". It takes you to NestingP.svelte as expected because it has an element that is not another component.
No, it gives App.svelte instead of NestingP.svelte. So basically if there's a nested component but nothing else in the parent component it's not detected at all.
oh, in that case the component is not selectable with the current implementation of svelte-inspector.
The information which file/position to open is attached to dom nodes and svelte inspector finds them. No dom node, no find.
We could look into the possibility of scanning for comment nodes too but that could get tricky. Going to mark this as edge-case. It may ultimately need help from svelte compiler to get fixed.
Describe the bug
In the inspector I can't get to the owner of nested component when hovering if the owner only contains the component.
Maybe it's supposed to be like that but I would like to be able to get to the owning component because I had set props there (not showing that in the repro example though).
In my real project I see
in the devtools element list but maybe the inspector doesn't use those?
Reproduction URL
https://stackblitz.com/edit/vitejs-vite-jwrile?file=src/lib/NestingP.svelte
Reproduction
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: