Skip to content

Support click from nested elements #54

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

Merged
merged 3 commits into from
Aug 23, 2021
Merged

Conversation

pablonete
Copy link
Contributor

@pablonete pablonete commented Aug 12, 2021

The logic that closes the menu when clicking a checked input assumes that clicks happen on a <label>, but actually if the label contains other elements, that click may come from them, like a <span>.

So instead of comparing target with label (menuitem), the new approach is comparing with input.

I've used npm link to verify that this fix works in dotcom.

Note to reviewers

Most of the changes in HTML were made by Prettier.
The only actual change is adding to reproduce the issue this PR fixes.

@pablonete pablonete requested a review from a team as a code owner August 12, 2021 13:45
@JoseInTheArena JoseInTheArena requested a review from srt32 August 12, 2021 17:23
@koddsson koddsson merged commit ff3c131 into github:main Aug 23, 2021
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.

3 participants