Verwendete Bootstrap-Version – v5.2.1
Ich habe Modal mit JavaScript initialisiert
Code: Select all
if (bootstrap == undefined) {
document.getElementById("browser-not-supported-container").classList.remove("d-none");
} else {
modal1 = new bootstrap.Modal(document.getElementById('modal1'));
modal2 = new bootstrap.Modal(document.getElementById('modal2'));
modal3 = new bootstrap.Modal(document.getElementById('modal3'));
}
Code: Select all
Code: Select all
TypeError Cannot read properties of undefined (reading 'backdrop')
https://example.com/:lineNo3:colNo3 Ni._initializeBackDrop
https://example.com/:lineNo2:colNo2 new Ni
https://example.com/:lineNo1:colNo1 HTMLDocument.
Ich habe es auch mit modalen Optionen versucht, aber der Fehler bleibt weiterhin bestehen
Code: Select all
modal1 = new bootstrap.Modal(document.getElementById('modal1'), { backdrop: "static", keyboard: false });
modal2 = new bootstrap.Modal(document.getElementById('modal2'), { backdrop: "static", keyboard: false });
modal3 = new bootstrap.Modal(document.getElementById('modal3'), { backdrop: "static", keyboard: false });
Mobile version