N°9322 - n:n attributes edition in portal search pop-up hidden behind

This commit is contained in:
Anne-Cath
2026-07-03 14:35:12 +02:00
parent 4b4fe55060
commit 9fa4e202fe

View File

@@ -55,11 +55,18 @@ $(document).ready(function()
// Hide tooltips when a modal is opening, otherwise it might be overlapping it
oBodyElem.on('show.bs.modal', '.modal', function ()
{
$(this).find('.tooltip.in').tooltip('hide');
var $this = $(this);
$this.find('.tooltip.in').tooltip('hide');
// Set the z-index of the modal and its backdrop in case we have several modals opened
let zIndex = 1050 + (10 * $('.modal:visible').length);
$(this).css('z-index', zIndex);
$('.modal:visible').each(function (index) {
let current_zIndex = $(this).css('z-index');
if (current_zIndex >= zIndex) {
zIndex = parseInt(current_zIndex)+10;
}
});
$this.css('z-index', zIndex);
// Set the z-index of the backdrop later because it is created after the modal
setTimeout(function() {
$('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');