ember-inspector
ember-inspector copied to clipboard
object inspector closes when i click anything on the website
The object inspector closes when i click on anything on the website which i am debugging. It should stay open so I can inspect the values in the component while interacting with the website.
Expected behavior The Object Inspector should always be open.
Environment Ember version: 4.4.0
the issue is probably here: https://github.com/emberjs/ember-inspector/blob/master/ember_debug/libs/view-inspection.js#L323 where hide is called if a component is pinned, and notification to the inspector is sent, which also hides the object inspector. can we disable the notification?
@patricklx when you say click on anything, do you mean clicking a component to inspect it or do you mean interacting with your app in general? I'm not entirely sure I am following the problem.
I mean interacting with my app
@patricklx I am not able to reproduce on https://music.apple.com/us/browse I clicked a component in Ember Inspector's component tab, which opened the object inspector, then clicked a button on the site and it stayed open. My guess is you are clicking things that teardown the component or something.
weird, it closes for me when i click on something. I noticed now that it does not close if the tooltip of the current selected component is NOT showing. If there is a tooltip, then when i click somewhere, it closes the tooltip and the open object inspector
https://user-images.githubusercontent.com/1332320/169776106-69e395f3-2207-43bb-b330-b688847a7bbc.mp4
Any update on this?
@patricklx no updates. My guess is that when a tooltip is open, there is a click handler that assumes you are going to be selecting another component and when clicked, it should open the new component, but since you do not have component selection toggled on, it selects nothing and closes.
This is pure speculation, but I think a fix would be to ensure that component inspection is toggled on before trying to grab the new component.
@rwwagner90 , probably the click handler in the file i pointed out earlier. https://github.com/emberjs/ember-inspector/blob/9aac4888c9de795a86a41d4105dd8c4a1c8d3cac/ember_debug/libs/view-inspection.js#L249.
and here https://github.com/emberjs/ember-inspector/blob/master/ember_debug/libs/view-inspection.js#L323 It also checks if its inspecting. So probably component inspection enabled. But in the not inspecting case it also closes the object inspector