select2的组件bug

解决方案:
在bootstrap.js中修改:
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
//以下为加入代码
if ($(e.target).hasClass('select2-search__field')) {
return true;
}
//加入代码结束
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
}

相关文章:

  • 2021-12-18
  • 2021-11-22
  • 2021-09-22
  • 2022-03-10
  • 2022-12-23
  • 2021-12-20
  • 2021-12-22
  • 2021-11-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
相关资源
相似解决方案