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

Clicking an open dropdown should close the dropdown #192

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Clicking an open dropdown should close the dropdown #192

wants to merge 7 commits into from

Conversation

smcmurray
Copy link

I'm not clear on why the code opened the parent .menu-item of any clicked element.

It seems that the only way the element could have been clicked in the first place is if its parent .menu-item was already open. So either that code was pointless, or I have failed to understand some case that this PR will now break.

Either way, when you click on an open dropdown, this PR should close that dropdown.

This assumes that EventListeners for the same event on the same element are executed in the order in which they were added.

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.

2 participants