Topic: Popover not closing when click outside

ARcode pro asked 3 years ago

Expected behavior Close popover when click outside of the trigger element.

Actual behavior It doesn't close if the element clicked is another popover element.

Resources (screenshots, code snippets etc.)


      <li *ngFor="let i of [1, 2, 3, 4, 5]" (click)="selectedElement = i"
          [mdbPopover]="popTemplate" triggers="focus" [outsideClick]="true"
        Element {{i}}
    <ng-template #popTemplate>
      Clicked on element {{selectedElement}}


selectedElement: number = 0

In this example, if you click an item, the popover shows properly. If you click outside the list, then it also hides correctly. The problem comes when you click on one item and then you click another. The variable "selectedElement" updates accordingly, but the previous popover doesn't hide, which causes results a user may not understand.

Is there any solution to this situation?


Grzegorz Bujański staff answered 3 years ago

thanks for reporting this issue. We will fix it as soon as possible.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 10.1.1
  • Device: Computer
  • Browser: Any
  • OS: Windows
  • Provided sample code: No
  • Provided link: No