mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Improved the backdrop removal of the modal after modal submission
This commit is contained in:
parent
436aff7533
commit
89a4846259
2 changed files with 11 additions and 11 deletions
|
@ -4,16 +4,7 @@ import {Modal} from "bootstrap";
|
|||
export default class extends Controller
|
||||
{
|
||||
connect() {
|
||||
|
||||
|
||||
this.element.addEventListener('show.bs.modal', event => this._handleModalOpen(event));
|
||||
|
||||
//Register an event to remove the backdrop, when the form is submitted
|
||||
const form = this.element.querySelector('form');
|
||||
form.addEventListener('submit', event => {
|
||||
//Remove the backdrop
|
||||
document.querySelector('.modal-backdrop').remove();
|
||||
});
|
||||
}
|
||||
|
||||
_handleModalOpen(event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue