Popover doesn't close when clicking a button that would cause a a modal to be rendered
See original GitHub issueDescribe the issue. What is the expected and unexpected behavior? In OCM we have some help popovers in cards where there’s also a button that opens a modal by rendering a new one (it’s not rendered at all when closed). If a popover is opened, and this button is clicked - the popover remains open. I expect the popover to close, just like it closes when I click anywhere else in the page.
Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool. https://codesandbox.io/s/boring-clarke-jw9nb?file=/index.js
Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around? bug
What is your product and what release version are you targeting?
OCM. We’re currently on "@patternfly/react-core": "^4.63.3",
but this bug reproduces with the latest version as well (see reproducer link above)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Thanks for reporting @elad661 , I’ll take a look at this. In the meantime for an easy workaround:
@kmcfaul provided the solution to this issue, thanks Katie!