Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open challenges for the :disabled "state" #46

Open
Inwerpsel opened this issue Oct 27, 2023 · 0 comments
Open

Open challenges for the :disabled "state" #46

Inwerpsel opened this issue Oct 27, 2023 · 0 comments
Labels
needs info The issue probably doesn't have enough information/ideas to be actionable at this time

Comments

@Inwerpsel
Copy link
Owner

Inwerpsel commented Oct 27, 2023

For this application, the :disabled selector and disabled elements are a particularly hard case to handle.

Selector syntax

It actually depends on an attribute, unlike similar looking selectors that depend on a state triggered by a user interaction. I guess using [disabled] was too easy.

It's unclear whether it should be treated as a full selector, and only shown on actually disabled elements, or whether it should be treated similar to the hover state, and shown on each occurrence on the element even if not actually disabled. The choice is further made difficult by the following.

Disabled elements are fundamentally unclickable

If an element is disabled, the browser really pretends it's not there, and the click ends up on the first non-disabled parent. Hence it becomes un-inspectable through a direct click.

I expect this to be hard to address, because the inspection behavior is also like that in browser dev tools, and I imagine they would have fixed that if it was easy.

Even elementFromPoint has this behavior.

@Inwerpsel Inwerpsel added the needs info The issue probably doesn't have enough information/ideas to be actionable at this time label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info The issue probably doesn't have enough information/ideas to be actionable at this time
Projects
None yet
Development

No branches or pull requests

1 participant