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

chore: replace event marking with focus-within #10097

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

nnaydenow
Copy link
Contributor

@nnaydenow nnaydenow commented Oct 28, 2024

Previously, event marking was used to identify the origin of an event from a specific component, preventing unintended interactions with other components. This approach prevented redundant event processing, particularly in cases of component composition.

Now, if a component receives focus, it will manage most events. The :has(:focus-within) selector checks if the current element (typically the root element) has a focusable child. If a child is focused, we assume it will handle user interactions.

Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. A lot of simplification! Please get a +1 from every component team too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants