Opened 12 years ago
Closed 10 years ago
#10501 closed Bug (duplicate)
[IE] Permission denied when calling setData very fast
Reported by: | Olek Nowodziński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 Beta |
Keywords: | IE | Cc: |
Description
- Go to http://ckeditor4.t/ckeditor/samples/api.html
- Click Set Editor Contents very fast.
SCRIPT70: Permission denied
May affect other IEs (to be checked).
Change History (12)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Milestone: | CKEditor 4.1.2 |
---|---|
Version: | 4.1.2 (GitHub - master) → 4.0 |
comment:3 Changed 12 years ago by
Keywords: | IE added |
---|---|
Status: | new → confirmed |
Summary: | [IE10] Permission denied when calling setData very fast → [IE] Permission denied when calling setData very fast |
Version: | 4.0 → 4.0 Beta |
I was able to reproduce this problem from CKE 4.0 beta in IE7-10.
CKEDITOR.on( 'instanceReady', function( event ) { var i = 0; function next() { CKEDITOR.instances.editor1.setData( '<h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p>' ); if ( ++i < 5 ) setTimeout( next, 50 ); } next(); });
comment:4 Changed 11 years ago by
I have decided to close #10079 as duplicate of this one. Another way to reproduce this problem is setting data when editor gains focus:
CKEDITOR.on('instanceReady', function (e) { e.editor.on('focus', function (e) { window.setTimeout(function(){e.editor.setData('');},10); //e.editor.setData(''); }); });
Please note that putting setData into setTimeout resolves the issue. Perhaps IE locks editor for a brief moment.
Error:
Message: Access denied
URI: ckeditor/core/editable.js
Line: 825
comment:6 Changed 11 years ago by
#10980 was marked as duplicate.
TC from that ticket:
editor.on( 'instanceReady', function( e ) { editor.setData('<p>abc</p>'); editor.resetDirty(); //editor.resetUndo(); //editor.focus(); });
- in CKEditor 3.x this was Unable to get property "innerHTML" of undefined or null reference
- In CKEditor 4.x Access denied is thrown.
comment:7 Changed 11 years ago by
I have downloaded ckeditor 4.4 standard and have this issue for IE11
Is there any fix for 4.4 ?
comment:8 follow-up: 9 Changed 11 years ago by
The only solution is calling setData after previous setData finished. That's the correct way of using setData.
comment:9 Changed 11 years ago by
Replying to Reinmar:
The only solution is calling setData after previous setData finished. That's the correct way of using setData.
How is it possible? If I need to call it 2 times in a row? Only with time stopper?
comment:10 Changed 11 years ago by
Editor.setData accepts a callback. Callback is executed when data is ready. It would be something like:
editor.setData( 'foo', function() { editor.setData( 'bar' ); } );
See docs: http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
comment:12 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | confirmed → closed |
This issue is a duplicate of more generla one #11502.
Error can be reproduced in all IEs since 4.0 with this code:
The difference between previous releases (i.e. 4.1.1) is that the time threshold to produce the error is much, much longer so now it can be re-produced manually.