溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

ckeditor在bootstrap modal中彈框無(wú)法輸入怎么辦

發(fā)布時(shí)間:2021-06-29 14:23:54 來(lái)源:億速云 閱讀:223 作者:小新 欄目:web開(kāi)發(fā)

這篇文章主要為大家展示了“ckeditor在bootstrap modal中彈框無(wú)法輸入怎么辦”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“ckeditor在bootstrap modal中彈框無(wú)法輸入怎么辦”這篇文章吧。

當(dāng)在bootstrap的modal中使用ckeditor時(shí),使用ckeditor中帶彈框的功能時(shí)無(wú)法輸入問(wèn)題。

解決方法:在jquery和bootstrap加載之后引入fix的js,js內(nèi)容:

  var $modalElement = this.$element;
  $(document).on('focusin.modal', function (e) {
    var $parent = $(e.target.parentNode);
    if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length
        // add whatever conditions you need here:
      &&
      !$parent.hasClass('cke_dialog_ui_input_select') && !$parent.hasClass('cke_dialog_ui_input_text')) {
      $modalElement.focus()
    }
  })

以上是“ckeditor在bootstrap modal中彈框無(wú)法輸入怎么辦”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI