Index: /CKEditor/branches/versions/3.4.x/_source/plugins/bidi/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.4.x/_source/plugins/bidi/plugin.js	(revision 5799)
+++ /CKEditor/branches/versions/3.4.x/_source/plugins/bidi/plugin.js	(revision 5800)
@@ -122,5 +122,5 @@
 				ranges = selection.getRanges();
 
-			if ( ranges )
+			if ( ranges && ranges.length )
 			{
 				// Apply do directly selected elements from guardElements.
@@ -135,5 +135,6 @@
 				if ( selectedElement )
 				{
-					switchDir( selectedElement, dir, editor );
+					if ( !selectedElement.isReadOnly() )
+						switchDir( selectedElement, dir, editor );
 				}
 				else
@@ -171,4 +172,7 @@
 						while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
 						{
+							if ( block.isReadOnly() )
+								continue;
+
 							var _break = 0;
 
