Skip to content
Snippets Groups Projects
Commit 9b1489c6 authored by pfleu's avatar pfleu
Browse files

Fix multiple backdrops

parent 391863e3
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,21 @@ $(function() {
});
});
// Bug rencontré par Mathieu sous firefox Linux (mais pas Chrome), plusieurs overlay sont ouverts, on supprime ceux en trop
document.addEventListener('show.bs.modal', function () {
// Select all modal-backdrop elements
const backdrops = document.querySelectorAll('.modal-backdrop');
// If there are more than one, remove all except the first one
if (backdrops.length > 1) {
backdrops.forEach((backdrop, index) => {
if (index > 0) {
backdrop.remove();
}
});
}
});
// Initialize Tooltips Bootstrap 5
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment