<Modal /> with an onClose prop and a <Portal />.<Portal />.<Modal />.Modal should open.
Modal never will open. Modal uses Portal as a wrapper if I understand clearly. click event listener subs to all open modals and portals and pass through all of them. Since didClicknRootNodeClick has been changed here, <Modal /> handles a click in handleDocumentClick and recognizes it as click on dimmer. Everything is ok if <Modal /> will be without dimmer or <Modal />'s content will be right under a click point.
0.77.2
Same happening here after upgrade to 0.77.2.
Is it related to this https://github.com/Semantic-Org/Semantic-UI-React/issues/2493 ?
Yes, this sounds like it is duplicated in #2493. See workarounds there. A fix is in the works.
I am releasing 0.78.1 right now with a proposed fix for this. Once it is live (~10 minutes), please update the codesandbox, try it, and report back.
Confirmed worked. Forked codesandbox here: https://codesandbox.io/s/328x7n20ym. I only needed to update to the latest 0.78.1 to get the fix.
Thanks for the reporting folks!
@levithomason it works for me too. Thank you for your work!
@levithomason seems like the issue is reproduced when the content of modal is changed. https://codesandbox.io/s/30n2v379r1 here is the example when changing one form with another - onClose is fired, it's important that the second form has more inputs, so markup very is different. Of course, workarounds are possible, but still.
if you ask, we can create a separate issue
OK, opened #2888
Most helpful comment
Confirmed worked. Forked codesandbox here: https://codesandbox.io/s/328x7n20ym. I only needed to update to the latest 0.78.1 to get the fix.
Thanks for the reporting folks!