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: event propagation for modal #11970

Closed

Conversation

dimatretyak
Copy link
Contributor

@dimatretyak dimatretyak commented Feb 22, 2023

The type of this PR is: Fix

This PR solves [PROJECT-XX]

Description

This PR includes fix for the problem, which you can see in the demo video. This is due to the fact that the ModalBase component uses createPortal and we are facing this problem (example with details)

Problem

When you click on the modal content, the click event is propagated to parents and the onClick handlers are triggered. Navigation to the artwork page is performed in our case, since we render this modal inside the Details component and displays this modal when clicking on the heart icon

Demo

demo.mp4

@dimatretyak
Copy link
Contributor Author

dimatretyak commented Feb 28, 2023

Decided to use a different approach: #11978

@dimatretyak dimatretyak deleted the dimatretyak/fix/event-propagation-for-modal branch June 12, 2023 13:28
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.

1 participant