diff --git a/datamodels/2.x/itop-portal-base/portal/public/js/toolbox.js b/datamodels/2.x/itop-portal-base/portal/public/js/toolbox.js index f37c36c69..1d572dbda 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/js/toolbox.js +++ b/datamodels/2.x/itop-portal-base/portal/public/js/toolbox.js @@ -106,7 +106,11 @@ var CombodoPortalToolbox = { if (oOptions.base_modal.usage === 'clone') { oModalElem = oSelectorElem.clone(); - oModalElem.attr('id', oOptions.id) + + // Force modal to have an HTML ID, otherwise it can lead to complications, especially with the portal_leave_handle.js + // See N°3469 + let sModalID = (oOptions.id !== null) ? oOptions.id : 'modal-with-generated-id-'+Date.now(); + oModalElem.attr('id', sModalID) .appendTo('body'); } // - Get an existing modal in the DOM