I'm not sure how your popup is set up and it is actually something that isn't supported since it requires custom coding, however it could have something to do with the add to cart button forwarding to another page that is causing the window to close again. Maybe if you posted a link to the page, someone will have a better idea and can help you out.