Closed YuitoSato closed 1 year ago
Same issue here, started when I upgraded to 7.1.0. I tried reverting the change in https://github.com/alexkatz/react-tiny-popover/commit/11096b522d2fe83ba16df02ea1381a83eac91f12 and it is indeed the culprit.
Those affected must either downgrade to 7.0.1 until this is fixed, or implement quite a bit of logic to prevent this from happening. @alexkatz What are your thoughts this situation? I think it would be best if this behavior was optional, but disabled by default.
@KorySchneider @alexkatz Thank you for your work. Did this pr solve this issue?
https://github.com/alexkatz/react-tiny-popover/commit/7d62b9ba
@YuitoSato I will test the new version soon and let you know, thanks!
@YuitoSato Sorry I thought a new version had been released. The link in your comment is not to a PR.
@KorySchneider @YuitoSato
This week I've released 7.2.0
, which adds a clickOutsideCapture
boolean option, false
by default. I'll close this for now, but feel free to create a new issue if you're still experiencing problems in this area.
Cheers!
@alexkatz Tested and it's working. Many thanks!
Thank you for your works! @alexkatz
Hi @alexkatz @KorySchneider I also had same issue with nested popovers and was waiting for the new version hoping that would resolve the issue. But I am still facing the same issue with new version too.
Problem: Interacting with nested popover will close the parent popover. Example: https://codesandbox.io/s/wild-brook-6ttx95?file=/src/App.js
Let me know if I am missing something here in my implementation and it would be great if you could suggest a solution for these kind of use cases.
@cs-ashiqu I looked at your example and unfortunately am not sure why it isn't working properly 🙁
Hey @cs-ashiqu,
I made a slight modification to your codesandbox to get it working properly: https://codesandbox.io/s/intelligent-ride-g1w9q1?file=/src/App.js
I think the onClickOutside
is behaving properly in your sandbox. By clicking on the inner popover, you are indeed clicking outside of the outer one, so the outer one closes.
The solution is to nest the inner popover within the outer one, arranging things such that clicking within the inner popover is not actually clicking outside of the outer.
Hope that makes sense!
Sorry, did not mean to reopen this issue. Closing again, but please feel free to create a new issue if you're still experiencing issues.
I have trouble that clicking a popover on a popover closes the bottom popover.
Here is how to reproduce it.
This commit might be the cause. https://github.com/alexkatz/react-tiny-popover/commit/11096b522d2fe83ba16df02ea1381a83eac91f12
Thank you in advance.