I want to show standard confirmation modal when:
but it works only after user's gesture (for example user's click)
if reload page or close tab without any gesture modal doesn't appear and I get error
[Intervention] blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load
how to solve this problem?