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 agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.