Index: _source/plugins/editingblock/plugin.js
===================================================================
--- _source/plugins/editingblock/plugin.js	(revision 6435)
+++ _source/plugins/editingblock/plugin.js	(revision )
@@ -195,6 +195,7 @@
 	 */
 	CKEDITOR.editor.prototype.focus = function()
 	{
+		this.forceNextSelectionCheck();
 		var mode = getMode( this );
 		if ( mode )
 			mode.focus();
Index: _source/plugins/bidi/plugin.js
===================================================================
--- _source/plugins/bidi/plugin.js	(revision 6429)
+++ _source/plugins/bidi/plugin.js	(revision )
@@ -76,6 +76,9 @@
 
 	function switchDir( element, dir, editor, database )
 	{
+		if ( element.isReadOnly() )
+			return;
+
 		// Mark this element as processed by switchDir.
 		CKEDITOR.dom.element.setMarker( database, element, 'bidi_processed', 1 );
 
@@ -119,18 +122,6 @@
 			// Set new direction for this element.
 			element.setAttribute( 'dir', dir );
 
-		// If the element direction changed, we need to switch the margins of
-		// the element and all its children, so it will get really reflected
-		// like a mirror. (#5910)
-		if ( dir != dirBefore )
-		{
-			editor.fire( 'dirChanged',
-				{
-					node : element,
-					dir : dir
-				} );
-		}
-
 		editor.forceNextSelectionCheck();
 
 		return null;
@@ -191,8 +182,7 @@
 						)
 						selectedElement = getFullySelected( range, guardElements, enterMode );
 
-					if ( selectedElement && !selectedElement.isReadOnly() )
-						switchDir( selectedElement, dir, editor, database );
+					selectedElement && switchDir( selectedElement, dir, editor, database );
 
 					var iterator,
 						block;
@@ -222,7 +212,7 @@
 					iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
 
 					while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
-						!block.isReadOnly() && switchDir( block, dir, editor, database );
+						switchDir( block, dir, editor, database );
 					}
 
 				CKEDITOR.dom.element.clearAllMarkers( database );
@@ -261,9 +251,55 @@
 			addButtonCommand( 'BidiRtl', lang.rtl, 'bidirtl', bidiCommand( 'rtl' ) );
 
 			editor.on( 'selectionChange', onSelectionChange );
+			editor.on( 'contentDom', function()
+			{
+				editor.document.on( 'dirChanged', function( evt )
+				{
+					editor.fire( 'dirChanged',
+						{
+							node : evt.data,
+							dir : evt.data.getDirection()
+						} );
+				})
+			});
 		}
 	});
 
+	// If the element direction changed, we need to switch the margins of
+	// the element and all its children, so it will get really reflected
+	// like a mirror. (#5910)
+	function dirChangeNotifier( org )
+	{
+		var isAttribute = org == elementProto.setAttribute,
+			dirStyleRegexp = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
+
+		return function( name, val )
+		{
+			if ( !this.getDocument().equals( CKEDITOR.document ) )
+			{
+				var dirStyleMatch, dir;
+				if ( name == ( isAttribute ? 'dir' : 'direction' ) ||
+					 isAttribute && name == 'style' && ( dirStyleMatch = val.match( dirStyleRegexp ) )	)
+				{
+					dir = dirStyleMatch ? dirStyleMatch[ 1 ] : val;
+
+					if ( this.getDirection() != dir )
+					{
+						var retval = org.apply( this, arguments );
+						this.getDocument().fire( 'dirChanged', this );
+						return retval;
+					}
+				}
+			}
+
+			return org.apply( this, arguments );
+		};
+	}
+
+	var elementProto = CKEDITOR.dom.element.prototype;
+	elementProto.setStyle = CKEDITOR.tools.override( elementProto.setStyle, dirChangeNotifier );
+	elementProto.setAttribute = CKEDITOR.tools.override( elementProto.setAttribute, dirChangeNotifier );
+
 })();
 
 /**
Index: _source/plugins/dialogadvtab/plugin.js
===================================================================
--- _source/plugins/dialogadvtab/plugin.js	(revision 6348)
+++ _source/plugins/dialogadvtab/plugin.js	(revision )
@@ -36,14 +36,6 @@
 		var attrName = this.att,
 			value = this.getValue();
 
-		// Broadcast Lang Dir change
-		if ( attrName == 'dir' )
-		{
-			var dir = element.getAttribute( attrName );
-			if ( dir != value && element.getParent() )
-				this._.dialog._.editor.fire( 'dirChanged', { node : element, dir : value || element.getDirection( 1 ) } );
-		}
-
 		if ( value )
 			element.setAttribute( attrName, value );
 		else
