I am developing an MVC 5 Application. Using CK Editor to enhance text area throughout the site. I have a modal pop up window which uses ajax to render multiple tabs within the modal pop up. Each of the 3 tabs in the pop up have a text area called descritpion. When I first load the Modal window in Chrome the RTE's on each three tabs load as expected. However when I close the modal and re-open in Chrome the text areas are no long CK Editor textboxes and I get the error - uncaught-typeerror-cannot-read-property-clearcustomdata-of-null
The same behaviour happens if I have the modal open an click between the Tabs each text area renders as a CK Editor box until I hit the Tab for the 6th time and then they revert to regular text boxes and the same error is thrown in the console. The strange thing is when testing in IE 11 which is my other target browser I do not see any issue occuring (though I obviously need to fix this for Chrome). I am using the following - other libraries are used (bootstrap, etc but not listed all of them for brevity)
<package id="ckeditor-full" version="4.4.3"
<package id="jQuery" version="2.1.1"
Code in my JS file is as:
$(document).ready(function () {
var editor = CKEDITOR.instances['Description'];
if (editor) { editor.destroy(true); }
CKEDITOR.replaceAll();
});
and the cshtml markup that is rendered in the Partial View which each of the 3 Tabs load is as below:
<div class="row">
@Html.LabelFor(model => model.Description)
<div class="col-md-10">
@Html.TextAreaFor(model => model.Description)
</div>
</div>
Anyone came across this issue or got any suggestions for a possible fix/workaround?
