Opened 11 years ago
Closed 10 years ago
#10563 closed Bug (wontfix)
CKeditor 4.1.2: Access denied error in IE7
Reported by: | Cédric Delécluse | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1.2 |
Keywords: | IE7 | Cc: |
Description
Hello,
In my site I have this code in the page's header:
<script type="text/javascript"> document.domain = mysite.com </script>
I have a "Access denied" error with IE7 even if I add this line :
CKEDITOR.tools.fixDomain(true);
before :
CKEDITOR.replace( 'detail', { width: '430px', height:'200px', } );
To correct the problem I forced the domain in all cases. In core/tools.js, function fixDomain() I have added:
try { // Try to access the parent document. It throws // "access denied" if restricted by the "Same Origin" policy. domain = window.parent.document.domain; // Here I force the domain document.domain = domain; break; } catch ( e ) { ...
And now it's ok for me, I don't have "Access denied".
Change History (3)
comment:2 Changed 11 years ago by
Keywords: | IE7 added |
---|---|
Status: | new → confirmed |
comment:3 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | confirmed → closed |
We have dropped support for IE7 so I'm closing this ticket.
This is probably continuation of 10165-comment:28. To reproduce this problem I have:
document.domain='sub.example.com';
which is the same as current domainhttp://sub.example.com/ckeditor/samples/replacebycode2.html
Result: Access denied is thrown. Seems when domain set to the same value as actual domain is causing problems in IE7. I know editor sets document.domian for content area which is in iframe. Perhaps it doesn't do it when domain are the same and IE7 needs such setting.
NOTE:
The above is the only case that doesn't work. In ticket #10165 this issue was fixed probably all other cases e.g.
document.domain=example.com
set. Works.document.domain=example.com
set. Works as well.Useful link: http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do