Forum Academy Marketplace Showcase Pricing Features

Inactivity timer to close pop up

I have used the common plug-in to detect when user inactivity and trigger action.
while these all seem to work well , after x seconds … workflow triggered …

However I discover that when user left a POPUP opened and left his work station.
the inactivity kicked in and perform the workflow routine.

BUT LEFT THE POPUP as it …

is there way to close an active popup with code …
since there are so many popup in my sample app …

can we detect whihc popup is active and close it ?