当我解开我的模态时,我遇到了一个奇怪的问题,模态对话框消失但背景仍然存在。看看发生了什么,我看到当模型打开时,它会在body标签上添加一个ng-model类,并添加两个div的模态渲染和模态背景。
我在下面创建了一个丑陋的解决方法来解决它,但必须有一个原因,它不能按预期工作。
任何想法在哪里看?
document.body.setAttribute("class", "ng-scope");
var modalRender = document.body.lastChild;
var modalBackdrop = modalRender.previousSibling;
window.setTimeout(function()
{
modalBackdrop.style.zIndex = -1;
}, 100);
document.body.removeChild(modalRender);
答案 0 :(得分:0)
下面的链接有解决方案,转动Modal的动画来克服错误。
$modalInstance dialog box closes, but screen remains grayed out and inaccessible