Popover above an iFrame in React #2596
-
Hi, I have implemented a basic Popover as explained in the docs, but I have encountered that I cannot close the Popover when clicking outside of the box when clicking on the underlying iFrame (The black section as shown in the picture). I am using the useDismiss function and have set the modal to true for Is there a nice way of solving this issue or do I have to put an event listener on the iFrame to check for clicks? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Here is a code sandbox which shows what I mean: Sandbox |
Beta Was this translation helpful? Give feedback.
-
Use |
Beta Was this translation helpful? Give feedback.
Use
FloatingOverlay
so clicks are detected on that layer instead of arbitrary layers behind it. Outside clicks can't be detected inside sub-documents since the event doesn't bubble up to the oneuseDismiss
attached the listener to.