Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7674)
+++ /CKEditor/trunk/CHANGES.html	(revision 7675)
@@ -43,4 +43,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/9719">#9483</a> : [IE10] Fixed cursor after enter mode BR not blinking in next line.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/6410">#6410</a> : SCAYT will show no suggestions when appropriate, instead of not appearing.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/7533">#7533</a>, <a href="http://dev.ckeditor.com/ticket/9439">#9439</a> : Fixed SCAYT issues with setData().</li>
 	</ul>
 	<p>
Index: /CKEditor/trunk/_source/plugins/scayt/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 7674)
+++ /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 7675)
@@ -36,4 +36,8 @@
 		var createInstance = function()	// Create new instance every time Document is created.
 		{
+			if(typeof plugin.instances[ editor.name ] != 'undefined' || plugin.instances[ editor.name ] != null)
+			{
+				plugin.instances[ editor.name ].destroy();
+			}
 			var config = editor.config;
 			// Initialise Scayt instance.
@@ -79,5 +83,4 @@
 
 			var scayt_control = new window.scayt( oParams );
-
 			scayt_control.afterMarkupRemove.push( function( node )
 			{
@@ -103,5 +106,8 @@
 		};
 
-		editor.on( 'contentDom', createInstance );
+		editor.on( 'contentDom', function(ev)
+			{
+				createInstance(); 
+			});
 		editor.on( 'contentDomUnload', function()
 			{
@@ -124,7 +130,35 @@
 		editor.on( 'beforeCommandExec', function( ev )		// Disable SCAYT before Source command execution.
 			{
-				if ( ( ev.data.name == 'source' || ev.data.name == 'newpage' ) && editor.mode == 'wysiwyg' )
-				{
-					var scayt_instance = plugin.getScayt( editor );
+				if ( ev.data.name == 'source'  && editor.mode == 'source' )
+					plugin.markControlRestore( editor );
+			});
+
+		editor.on( 'afterCommandExec', function( ev )
+			{
+				if ( !plugin.isScaytEnabled( editor ) )
+					return;
+
+				if ( editor.mode == 'wysiwyg' && ( ev.data.name == 'undo' || ev.data.name == 'redo' ) )
+					window.setTimeout( function() { plugin.getScayt( editor ).refresh(); }, 10 );
+			});
+		editor.on( 'destroy', function( ev )
+			{
+				var editor = ev.editor,
+					scayt_instance = plugin.getScayt( editor );
+
+				// SCAYT instance might already get destroyed by mode switch (#5744).
+				if ( !scayt_instance )
+					return;
+
+				delete plugin.instances[ editor.name ];
+				// store a control id for restore a specific scayt control settings
+				plugin.setControlId( editor, scayt_instance.id );
+				scayt_instance.destroy( true );
+			});
+		//#9439 after SetData method fires contentDom event and SCAYT create additional instanse
+		// This way we should destroy SCAYT on setData event when contenteditable Iframe was re-created
+		editor.on( 'setData', function( ev )
+			{
+				var scayt_instance = plugin.getScayt( editor );
 					if ( scayt_instance )
 					{
@@ -135,44 +169,4 @@
 						delete plugin.instances[ editor.name ];
 					}
-				}
-				// Catch on source mode switch off (#5720)
-				else if ( ev.data.name == 'source'  && editor.mode == 'source' )
-					plugin.markControlRestore( editor );
-			});
-
-		editor.on( 'afterCommandExec', function( ev )
-			{
-				if ( !plugin.isScaytEnabled( editor ) )
-					return;
-
-				if ( editor.mode == 'wysiwyg' && ( ev.data.name == 'undo' || ev.data.name == 'redo' ) )
-					window.setTimeout( function() { plugin.getScayt( editor ).refresh(); }, 10 );
-			});
-
-		editor.on( 'destroy', function( ev )
-			{
-				var editor = ev.editor,
-					scayt_instance = plugin.getScayt( editor );
-
-				// SCAYT instance might already get destroyed by mode switch (#5744).
-				if ( !scayt_instance )
-					return;
-
-				delete plugin.instances[ editor.name ];
-				// store a control id for restore a specific scayt control settings
-				plugin.setControlId( editor, scayt_instance.id );
-				scayt_instance.destroy( true );
-			});
-
-		// Listen to data manipulation to reflect scayt markup.
-		editor.on( 'afterSetData', function()
-			{
-				if ( plugin.isScaytEnabled( editor ) ) {
-					window.setTimeout( function()
-						{
-							var instance = plugin.getScayt( editor );
-							instance && instance.refresh();
-						}, 10 );
-				}
 			});
 
@@ -375,7 +369,12 @@
 
 			if ( this.engineLoaded === true )
-				return onEngineLoad.apply( editor );	// Add new instance.
-			else if ( this.engineLoaded == -1 )			// We are waiting.
+			{
+				return onEngineLoad.apply( editor );				
+			}
+				// Add new instance.
+			else if ( this.engineLoaded == -1 )	
+			{	// We are waiting.
 				return CKEDITOR.on( 'scaytReady', function(){ onEngineLoad.apply( editor ); } );	// Use function(){} to avoid rejection as duplicate.
+			}
 
 			CKEDITOR.on( 'scaytReady', onEngineLoad, editor );
@@ -428,5 +427,7 @@
 			}
 			else
+			{
 				CKEDITOR.fireOnce( 'scaytReady' );
+			}				
 
 			return null;
