I´m showing the default alert when the user is navigating away from my web application. The problem is that if the user doesn´t respond to the default modal, after 2 minutes, the session of my application dies, so I would like to know if I´m able to close this pop up after a period of time, or, if that´s not possible, use a custom modal so I can handle it. I know there are A LOT of similar questions to this one, but I couldn´t find a solution, so I thought creating a new question could help me.
Thannk you in advance.
UPDATE: after a lot of research, I´ve come to the conclusion that it´s not possible to close the browser default pop up, or overwrite the alert on this event, so I had to come to another solution that nothing has to do with the solution I was looking for.