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

Dropdown — Emit events on the .dropdown-toggle button #32625

Merged
merged 5 commits into from
Feb 3, 2021

Conversation

rohit2sharma95
Copy link
Collaborator

Emit all events on the .dropdown-toggle button instead of .dropdown. Now seems that relatedTarget is not needed because the toggling element is available in the main event's target. @XhmikosR

Closes #31935

@rohit2sharma95
Copy link
Collaborator Author

It does not change/break the previous behavior though @XhmikosR
The event is now triggered on the toggle button and then bubbled up to the dropdown menu container.

@XhmikosR
Copy link
Member

I haven't looked closely, but if it's not a breaking change please finish the patch so that we ship it. I guess we could think about backporting it if it's really a safe patch.

@rohit2sharma95
Copy link
Collaborator Author

I believe that the relatedTarget property is not needed because the toggling button is present in the native event object. Since it would be a breaking change so leaving it as it is.

@mohe2015
Copy link

mohe2015 commented Feb 2, 2021

Does this also fix #30882 ?

@XhmikosR XhmikosR merged commit 3770b7b into main Feb 3, 2021
@XhmikosR XhmikosR deleted the rohit/main/dropdown-events branch February 3, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown Events Not Firing
4 participants