bootstrapValidator在校验模态框弹窗中又有模态框弹窗的时候就会报Maximum call stack size exceeded。
解决:把你多层弹窗里面的属性 都加上<div class="form-group"></div>
比如多层弹窗中我的备注项是不需要校验的 我就没写<div class="form-group"></div> 验证的时候就报Maximum call stack size exceeded栈溢出,之后添加上<div class="form-group"></div>就完美解决
以下是其它网友的解决方法:
在弹窗里面再弹窗,浏览器console报错:Uncaught RangeError: Maximum call stack size exceeded,导致页面上一些奇怪的错误。
这是bootstrap多层弹窗导致的。搜了一下果然如此,解决方案有两种:
1、注释了bootstrap.min.js的这一句代码即可。
enforceFocus:function(){
var t=this;
e(document).on("focusin.modal",function(e){
t.$element[0]!==e.target&&!t.$element.has(e.target).length/*多层弹窗死循环&&t.$element.focus()*/})
},
escape:function(){...}
2、是在页面js 里开始加上
$.fn.modal.Constructor.prototype.enforceFocus =function(){};