diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index 7182840b3..556029616 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -314,8 +314,14 @@ window.I18n = I18n; // Multiple modal support // https://stackoverflow.com/a/24914782 $(document).on('shown.bs.modal', '.modal', function() { - const zIndex = 2040 + 10 * $('.modal:visible').length; - $(this).css('z-index', zIndex); + let zIndex; + if ($(this).hasClass('custom-z-index') ) { + zIndex = $(this).css('z-index'); + } else { + zIndex = 2040 + 10 * $('.modal:visible').length; + $(this).css('z-index', zIndex); + } + setTimeout(() => $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack')); }); diff --git a/app/assets/stylesheets/my_modules/repositories.scss b/app/assets/stylesheets/my_modules/repositories.scss index 8f32f1ac5..6f66a2ffd 100644 --- a/app/assets/stylesheets/my_modules/repositories.scss +++ b/app/assets/stylesheets/my_modules/repositories.scss @@ -155,7 +155,6 @@ #myModuleRepositoryFullViewModal { padding-left: 0 !important; - z-index: 1045; .modal-dialog { height: 100vh; diff --git a/app/views/my_modules/repositories/_full_view_modal.html.erb b/app/views/my_modules/repositories/_full_view_modal.html.erb index 7f6e4ced6..ac42e5297 100644 --- a/app/views/my_modules/repositories/_full_view_modal.html.erb +++ b/app/views/my_modules/repositories/_full_view_modal.html.erb @@ -1,4 +1,4 @@ -