Via icon indicating copy to clipboard operation
Via copied to clipboard

Confirmation to leave page not working (onbeforeunload)

Open oris1024 opened this issue 1 year ago • 1 comments

Greetings,

I'm unable to have via show a confirmation dialog (with Leave and Stay buttons) before leaving the page when the back button is tapped. The confirmation works when there were changes to the form on the page and the reload button is tapped, but not with the back button.

This is the JavaScript code I'm using:

window.onbeforeunload = function() {
    return 'There is unsaved data.';
};

This works in chrome for both reload and back buttons, but not in via. Is there any other js/jquery code (I tried many though!) or a setting I could tweak to make this work?

Thanks, With kind wishes

oris1024 avatar Mar 16 '24 18:03 oris1024

+1

sekedus avatar Jun 23 '24 13:06 sekedus