在弹窗里面再弹窗,浏览器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(){};