Access Denied error for getFrameDocument:function() in ckeditor.js for ckeditor version 4.0.1

380 Views Asked by At

We have upgraded CKEditor from version 3.6.2 to 4.0.1.
We are getting an "Access Denied" error for the ckeditor.js at the following code, when we select an image in CKEditor and right click and open image properties.
We are not able to close the image properties dialog box and we are getting the error at below code.

   getFrameDocument:function() {
     var a=this.$;
     try {
       a.contentWindow.document
     } 
     catch(b) {
       a.src=a.src
     }
     return a&&new CKEDITOR.dom.document(a.contentWindow.document)
   }

Kindly help us to fix the problem.

1

There are 1 best solutions below

0
On

i changed in ckeditor.js such that;

src="']; d.push(b ? "javascript:void((function(){document.open();document.domain='" + document.domain + "';document.close();})())" : document.domain); d.push('"></iframe>');

instead of below line;

src="javascript:void('];d.push(b?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0");d.push(')"></iframe>');

maybe also you can add browser version condition at the code. i changed, it works for me.