Dynamic Popover auto-close after click

Hi @nolimits4web , I’m using the "core"version with the latest release.

I’ve got a dynamic popover and I need when the user clicks on each option, to close the popover.

This is my code :

I need that each < a > closes the popover when it’s get clicked, specially the ones that area external-links. how can I handle it?

because it ignores me these events:

popover.on('click', function () {
  console.log("click popover1");
  // popover.close();

  $$(document).on('click', '.close-on-click', function(e)
        console.log("click popover2");
      //  popover.close();

  $$(".popover-phone").on('click', '.close-on-click', function(e)
        console.log("click popover3");
      //  popover.close();

Thanks in advance.

app.popover.close() or this.$f7.popover.close()

Or you can close/open it by passing popover CSS selector app.popover.close('.popover-menu')

Copy from another @nolimits4web response.

Hi fernando, thanks for your answer but this is not the answer to my question.
I know how to force to close the popover
I need to handle that click event in the DOM, because the data-backdrop true/false not works.

What about just adding popover-close class to those links?

Thanks Vladimir, I skiped that when I checked the documentation.