bootstrap 的modal中popover操作时,弹窗中的输入框,按钮不能聚焦

本地894行

  Modal.prototype.enforceFocus = function () {
    $(document)
      .off('focusin.bs.modal') // guard against infinite focus loop
      .on('focusin.bs.modal', $.proxy(function (e) {
          if ($(e.target).parents('.popover').length > 0) return;//mod by xss modal上popover的时候popover中的内容不能聚焦
          if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
              this.$element.focus()
          }
      }, this))
  }

 

posted @ 2016-06-07 18:10  前门攻城狮  阅读(645)  评论(0编辑  收藏  举报