From fd4e41950c5b4017d9b8154eee412a42b27dcec8 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 20 Nov 2019 15:36:44 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02092=20Portal:=20Fix=20missing=20scrollb?= =?UTF-8?q?ar=20in=20tall=20form=20modals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/public/js/bootstrap-portal-modal.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 8724de867..6a5f06392 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 @@ -37,6 +37,21 @@ $(document).ready(function() $(this).find('.modal-content').html(GetContentLoaderTemplate()); }); + /* + * Hack (ugly) for some corner cases where we have not find the root cause yet. + * + * Follows the hack in "bootstrap-patches.js" as it not always enough. + * + * Problem seems to happen when several modals are opened / closed during a workflow, + * typically with the global request extension (During creation). + */ + setInterval(function(){ + if($('.modal.in').length > 0) + { + oBodyElem.addClass('modal-open'); + } + }, 1000); + // Hide tooltips when a modal is opening, otherwise it might be overlapping it oBodyElem.on('show.bs.modal', function () {