Opened 10 years ago
Closed 10 years ago
#12482 closed Bug (expired)
Uncaught TypeError: Cannot read property 'clearCustomData' of null in Chrome
Reported by: | Jeff Steil | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
After opening an instance of ckeditor in an ajax rendered window, the next time it opens I want to destroy the existing instance but in Chrome it is throwing an exception - "Cannot read property 'clearCustomData' of null in Chrome". I was able to fix this in the minified version of ckeditor.js by adding the if logic I detailed here: http://stackoverflow.com/questions/25034150/ck-editor-uncaught-typeerror-cannot-read-property-clearcustomdata-of-null-i/26022306#26022306
Basically clearCustomData is being called an object that is null, I just added if statements to check if the object exists before calling clearCustomData.
Attachments (1)
Change History (4)
Changed 10 years ago by
Attachment: | ckeditor.js added |
---|
comment:1 Changed 10 years ago by
Status: | new → pending |
---|---|
Version: | 4.4.4 |
It doesn't look like a solution to me but way to hide the real problem.
- Could you send us reduced and working code sample that will show this problem? I'm talking about HTML file (with js, css if needed) that can be put in samples folder and will show this issue.
- What code you use for your editor? Is it the same as in stackoverflow?
var editor = CKEDITOR.instances['Description']; if (editor) { editor.destroy(true); } CKEDITOR.replaceAll();
If that is the case you could replace it with
var editor = CKEDITOR.instances['Description']; if (editor) { editor.destroy(true); } CKEDITOR.on('instanceDestroyed', function(evt){ CKEDITOR.replace('someId'); });
Could you tell me if it has worked for you?
One final question. Why destroying one editor and then create editor on all possible textareas with CKEDITOR.replaceAll();
method? The replace
method should be used instead.
comment:2 Changed 10 years ago by
Yes, completely agree. I just needed a quick fix so that is what I came up with. I will walk through your suggestions and if they don't fix the issue will attach a working code sample.
comment:3 Changed 10 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
modified ckeditor.js (minified)