# Popover in subview does not close when clicking outside

**URL:** <https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245>\
**Category:** Bug reports\
**Tags:** ui\
**Created:** [February 7, 2023, 8:47am UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245 "2023-02-07T08:47:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [February 7, 2023, 8:47am UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245/1 "2023-02-07T08:47:48Z")

</div>

I built my custom header/app bar in a subview inside which I have a popover but this one does not disappear when clicking outside:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/10d351a85be3eb1fe3e8475d84989cb6bb47a1c4.png)

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [February 8, 2023, 2:37pm UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245/2 "2023-02-08T14:37:39Z")

</div>

Hi! Tried to reproduce this one, but the popover disappears in all cases we tried. We tried all different settings on the popover and the open popover action node, as well as putting the triggering action inside and outside the subview…

Could it be that you have copied a view containing a popover, resulting in more thatn 1 popover with the same name, and that the “open popover” action is in fact opening another popover you do not see?

If you do not figure it out, let me know.

---

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [February 9, 2023, 9:53am UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245/3 "2023-02-09T09:53:10Z")

</div>

Hi Kristian,

Weird. Still have the issue, on the ControlV solution, in the header, on the bell icon, just added you to the solution.

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [February 9, 2023, 10:51am UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245/4 "2023-02-09T10:51:02Z")

</div>

Hi! Fixed. The popover was put inside the container with the event for opening the popover. By looking at the log, the open popover action was triggered everytime you clicked outside the popover to hide it (because the click traverse bach to the popover location) 😉

---

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [February 9, 2023, 2:23pm UTC](https://community.appfarm.io/t/popover-in-subview-does-not-close-when-clicking-outside/245/5 "2023-02-09T14:23:47Z")

</div>

Thanks!! Noted for next time 😉
