5 ms·
All my web application's forms have onbeforeunload handlers that prevent you from accidentally navigating away from the page (including the back button) once yo
by wvenable 16y ago
All my web application's forms have onbeforeunload handlers that prevent you from accidentally navigating away from the page (including the back button) once you've started editing a long form. It's possible to continue to navigate away from the onbeforeunload dialog but the cancel button is a nicer way out. Every cancel button also has a confirmation on it so you can't accidentally cancel the form either.