If you could provide some code examples, that would be helpful in answering your specific question.
This may or may not help, but in Ionic the PopoverController
itself has a getTop()
method which returns a promise that, when it resolves, gives you the current “topmost” popover.
If you want to be sure that the popover you’re talking about is the correct one, you can test it like this:
const popover = await this.popoverCtrl.getTop();
if (popover.id === 'some-id-here') {
popover.dismiss();
}