2016-03-03 75 views

回答

1

使用此代码。

<script> 
    CKEDITOR.replace('help_ldesc'); 
    //CKEDITOR.replace('help_ldesc1'); 

    $.fn.modal.Constructor.prototype.enforceFocus = function() { 
     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 && $(e.target).parentsUntil('*[role="dialog"]').length === 0) { 
         $modalElement.focus(); 
       } 
     }); 
}; 
</script>