codedance / jquery.AreYouSure

A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
507 stars 145 forks source link

removeClass on submit should honor preventDefault method #137

Open esemlabel opened 6 years ago

esemlabel commented 6 years ago
$form.submit( function (e) {
    if ( ! e.isDefaultPrevented() ) {
        $form.removeClass( settings.dirtyClass );
    }
} );