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

[Not a bug] Modal event propagation #147

Closed
wants to merge 3 commits into from

Conversation

thomaslarsson
Copy link

@thomaslarsson thomaslarsson commented Jul 30, 2024

After some trial and error, we found out that the event propagation (naturally) only happened when the MdModal was a child element of an element with a click-handler. A real life problem happened due to this as well, even though the modal was moved in the DOM using a portal. Why this works is beyond the scope of this issue.

Similar problems can be solved by moving the component outside the problematic click handler. Another solution is to wrap the Modal element itself with a handler that stops propagation upwards towards the problematic parent.

The behavior is not a bug itself with the component library. I'm therefore closing this issue.

Copy link
Contributor

Please set a versioning label of either major, minor, or patch to the pull request.

@thomaslarsson thomaslarsson changed the title [Hotfix] Modal event propagation [Not a bug] Modal event propagation Jul 31, 2024
@thomaslarsson thomaslarsson deleted the hotfix/modal-event-propagation branch July 31, 2024 11:48
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.

1 participant