Bhupesh
Bhupesh

Reputation: 881

CKEditor image dialog forms not clickable when in a modal dialog

I am using bootstrap modal popup to open ckeditor. It's working but when I to click the image icon in that dialog opens, but not clickable.

Upvotes: 1

Views: 818

Answers (1)

Bhupesh
Bhupesh

Reputation: 881

Using this code.

<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>

Upvotes: 1

Related Questions