Opened 11 years ago

Closed 9 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

  1. Go to http://ckeditor4.t/ckeditor/samples/api.html
  2. Click Set Editor Contents very fast.
  3. SCRIPT70: Permission denied

May affect other IEs (to be checked).

Change History (12)

comment:1 Changed 11 years ago by Olek Nowodziński

Error can be reproduced in all IEs since 4.0 with this code:

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();

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.

comment:2 Changed 11 years ago by Olek Nowodziński

Milestone: CKEditor 4.1.2
Version: 4.1.2 (GitHub - master)4.0

comment:3 Changed 11 years ago by Jakub Ś

Keywords: IE added
Status: newconfirmed
Summary: [IE10] Permission denied when calling setData very fast[IE] Permission denied when calling setData very fast
Version: 4.04.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 Jakub Ś

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:5 Changed 11 years ago by Jakub Ś

#10663 was marked as duplicate

comment:6 Changed 11 years ago by Jakub Ś

#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(); 
				});	
  1. in CKEditor 3.x this was Unable to get property "innerHTML" of undefined or null reference
  2. In CKEditor 4.x Access denied is thrown.

comment:7 Changed 10 years ago by Alex

I have downloaded ckeditor 4.4 standard and have this issue for IE11 Is there any fix ?

Version 0, edited 10 years ago by Alex (next)

comment:8 Changed 10 years ago by Piotrek Koszuliński

The only solution is calling setData after previous setData finished. That's the correct way of using setData.

comment:9 in reply to:  8 Changed 10 years ago by Alex

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?

Last edited 10 years ago by Alex (previous) (diff)

comment:10 Changed 10 years ago by Piotrek Koszuliński

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:11 Changed 10 years ago by Jakub Ś

#11943 was marked as duplicate.

comment:12 Changed 9 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

This issue is a duplicate of more generla one #11502.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy