Inwerpsel / use-theme-editor

A React theme editor
GNU General Public License v3.0
4 stars 0 forks source link

Elements that become visible after hovering a parent element should stay visible while using the inspector #32

Open Inwerpsel opened 1 year ago

Inwerpsel commented 1 year ago

Some elements are only shown while hovering a parent element. Most commonly this concerns dropdown menus and popovers.

You can currently inspect these, however the element disappears when moving the mouse off the parent.

Perhaps this can be solved in a general way by just simulating a hover on this deepest element as long as no other element is inspected.

This can make use of the mechanism added for https://github.com/Inwerpsel/use-theme-editor/issues/31.

It might prove challenging, though, since this forced display should not actually put the inspected element itself into a hover state, as that would prevent other styles from applying. So the forced state has to be applied as high up the tree as possible to still ensure the right element gets shown.