diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js index 8b4c689c77..9bba9ee9a9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js @@ -96,6 +96,14 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f }); _$modal.on('shown.bs.modal', function () { + var modalBackdrop = $('.modal-backdrop').last(); + if (modalBackdrop) { + var zIndex = parseInt(_$modal.css('z-index')); + if (!isNaN(zIndex)) { + modalBackdrop.css("z-index", zIndex - 1); + } + } + if (!options.focusElement) { //focuses first element if it's a typeable input. var $firstVisibleInput = _$modal.find('input:not([type=hidden]):first'); @@ -127,6 +135,12 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f _modalObject.initModal && _modalObject.initModal(_publicApi, _args); } + var modalCount = $('.modal').length; + var zIndex = parseInt(_$modal.css('z-index')); + if (!isNaN(zIndex)) { + _$modal.css("z-index", zIndex + modalCount - 1); + } + _$modal.modal('show'); };