ember-inspector icon indicating copy to clipboard operation
ember-inspector copied to clipboard

object inspector closes when i click anything on the website

Open patricklx opened this issue 2 years ago • 8 comments

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 avatar May 18 '22 13:05 patricklx

@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.

RobbieTheWagner avatar May 18 '22 20:05 RobbieTheWagner

I mean interacting with my app

patricklx avatar May 19 '22 04:05 patricklx

@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.

RobbieTheWagner avatar May 20 '22 15:05 RobbieTheWagner

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

patricklx avatar May 23 '22 08:05 patricklx

https://user-images.githubusercontent.com/1332320/169776106-69e395f3-2207-43bb-b330-b688847a7bbc.mp4

patricklx avatar May 23 '22 08:05 patricklx

Any update on this?

patricklx avatar Jun 03 '22 20:06 patricklx

@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.

RobbieTheWagner avatar Jun 08 '22 14:06 RobbieTheWagner

@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

patricklx avatar Jun 08 '22 18:06 patricklx