From 9fa4e202fef08790f0e9dd898169f5a24b5ee4c4 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Fri, 3 Jul 2026 14:35:12 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B09322=20-=20n:n=20attributes=20edition=20?= =?UTF-8?q?in=20portal=20search=20pop-up=20hidden=20behind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/public/js/bootstrap-portal-modal.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js b/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js index ca4ee95584..e677074faf 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js +++ b/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js @@ -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');