I had an issue similar to that when I used my phone or computers browser on questionable sites. The pop up that comes up is actually triggered by another window that suddenly opens in the browser. If you can manage to close both the popular then that window, you are golden. Problem is, it reopens pretty damned fast. Hopefully this is the type of issue you are having. If you ran across an actual download, my sympathies. Best you can do is reboot your phone or computer in safe mode and hunt for the problem that way.