You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated from alpha.12 to beta.1. Since this update, a modal which contains 2 forms and a submit button, does not submit any longer. It fails silently, not error is shown in the console.
Ok, it is caused by the use of querySelector, which returns only the first form in the modal body. Before the update, the JQuery find method was used, which returned all the forms.
Here is the quick fix, using querySelectorAll :
submit() {
let forms = this.get('modalElement').querySelectorAll('.modal-body form');
if (forms) {
// trigger submit event on body forms
let event = document.createEvent('Events');
event.initEvent('submit', true, true);
forms.forEach( (form) => {
form.dispatchEvent(event)
});
} else {
// if we have no form, we send a submit action
this.get('onSubmit')();
}
}
No time to put a nice pull request right now, but I can later if you want ;-)
Hello,
I updated from alpha.12 to beta.1. Since this update, a modal which contains 2 forms and a submit button, does not submit any longer. It fails silently, not error is shown in the console.
I narrowed down the issue to this commit (Removed jQuery-dependency)
I'm currently debugging to see where exactly it fails, but perhaps you will find the issue at once ;-)
The text was updated successfully, but these errors were encountered: