This is my code. Even putting this data-backdrop="static" it closes anyway when you click outside.
<div class="modal fade" id="centrosdisp" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticcentros" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticcentros">Selecciona el centro deseado</h5>
</button>
</div>
<div class="modal-body" id="listacentrosajax">
Cargando, un momento
</div>
</div>
</div>
</div>
Hi,
If you are using Metronic v8.x with Bootstrap 5.x plese refer to the updated documentation.
Now, with Bootstrap 5.x you will need to use data-bs-*
attribute format instead of data-*
.
Regards.