Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Popup): ensure popup is closing on outside click #598

Merged
merged 4 commits into from
Dec 12, 2018

Conversation

kuzhelov
Copy link
Contributor

@kuzhelov kuzhelov commented Dec 11, 2018

Fixes the issue is described here: #557

TODO

  • update changelog

Root cause

The cause of the problem is the fact that Menu component "intercepts" click event, so that Popup is unaware of whether this event has happened or not.

Fix

useCapture event interception logic is now used for Popup event subscriptions - this will guarantee that event won't pass unnoticed.

Copy link
Member

@miroslavstastny miroslavstastny left a comment

Choose a reason for hiding this comment

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

This fixes the issue with MenuItem being the trigger for popup.
It still does not work for nested popup (no regression) - https://codesandbox.io/s/wk5vvw56pw.

@kuzhelov kuzhelov merged commit ed46077 into master Dec 12, 2018
@kuzhelov kuzhelov deleted the fix/popup-not-closing-in-menu branch December 12, 2018 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants