-
Notifications
You must be signed in to change notification settings - Fork 841
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
Add event target checker for EuiOverlayMask's onClick prop #3462
Add event target checker for EuiOverlayMask's onClick prop #3462
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
J, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TAYTS ! This works really well in the overlay mask docs section where the text is now selectable but can still click the mask part to close.
I just don't think we should add it to all the modal examples (reasons below).
42b5ada
to
1562383
Compare
retest |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
Changed the buttons to be a simple "Close" button so that it becomes a more simple modal example that is ok to work with the onClose of the overflow mask
retest |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
retest |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
retest |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
CI is failing with
|
Thanks on me, thanks @chandlerprall |
retest |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3462/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Yay, we're passing! Thanks again @TAYTS
Summary
Added event target checker for EuiOverlayMask's onClick prop to prevent the onClick function from firing due to the wrapping child elements's onClick event propagation.
Issue: #3429
Checklist
- [ ] Added or updated jest tests- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes