MDL-64554 form: reset form change checker before triggering submit event
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
7f23a739ed
commit
5e343e277b
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -381,11 +381,14 @@ export default class ModalForm {
|
||||
} else {
|
||||
// Form was submitted properly. Hide the modal and execute callback.
|
||||
const data = JSON.parse(response.data);
|
||||
const event = this.trigger(this.events.FORM_SUBMITTED, data);
|
||||
if (!event.defaultPrevented) {
|
||||
this.modal.hide();
|
||||
}
|
||||
return null;
|
||||
return this.notifyResetFormChanges()
|
||||
.then(() => {
|
||||
const event = this.trigger(this.events.FORM_SUBMITTED, data);
|
||||
if (!event.defaultPrevented) {
|
||||
this.modal.hide();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
return null;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user