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

fix: stop click event propagation in Modal #1058

Merged

Conversation

vladimir-cucu
Copy link
Contributor

@vladimir-cucu vladimir-cucu commented Mar 24, 2024

Done

  • Stopped click event propagation when closing Modal and when closing or confirming ConfirmationModal.

QA

  • Check that Modal and ConfirmationModal renders as expected in storybook.
  • (optional) For example, the stop click event propagation can be tested in Juju Dashboard when opening the charm actions panel of a charm and clicking on an action. A ConfirmationModal will be rendered in a Portal. Clicking the close button used to close the panel, but, using the changes in this PR, it doesn't.

Fixes

@webteam-app
Copy link

Demo starting at https://react-components-1058.demos.haus

Copy link
Collaborator

@huwshimi huwshimi left a comment

Choose a reason for hiding this comment

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

I've QAed this with Juju Dashboard and it works!

src/components/ConfirmationModal/ConfirmationModal.tsx Outdated Show resolved Hide resolved
src/components/Modal/Modal.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@huwshimi huwshimi 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!

@vladimir-cucu vladimir-cucu merged commit 10a094b into canonical:main Mar 26, 2024
7 checks passed
Copy link

🎉 This PR is included in version 0.51.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

What to do with propagation of click events in ConfirmationModal?
3 participants