I would like to have a dialog/alert when a user clicks on close the metamask popup. But metamask only sends error if a user cancels the transaction and no error is thrown when a user closes the transaction popup. I tried window.onBeforeunload but did not apply for the metamask popups. Any ideas?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.