IE8/Firefox浏览器中, 重复弹出(stack modal)modal会导致IE报stackoverflow at line 的错误, 问题出在boostrap2.3版本中modal.js:
, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
解决办法:
// after boostrap.js files load
$.fn.modal.Constructor.prototype.enforceFocus = function () {};
参考资料:
网友评论