Inwerpsel / use-theme-editor

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

`pointer-events: none` on an element prevents inspecting it and its children #66

Open Inwerpsel opened 5 months ago

Inwerpsel commented 5 months ago

Because inspection works with a simple click listener on the document, it won't fire for elements that have pointer-events: none in their stylemap. Instead it will inspect the next parent that doesn't have this property. In some cases this makes important styles impossible to reach.

It's hard to get around because this behavior is baked quite deep: even browser's built in dev tools will adhere to it while inspecting and require you to manually drill down deeper using the inspector tree view. Even document.elementFromPoint will have the same result.

Possible solutions:

Workarounds: