check popup visible before showing in onreset