Index: /CKEditor/branches/versions/3.1.x/CHANGES.html
===================================================================
--- /CKEditor/branches/versions/3.1.x/CHANGES.html	(revision 4642)
+++ /CKEditor/branches/versions/3.1.x/CHANGES.html	(revision 4643)
@@ -107,4 +107,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4690">#4690</a> : Fixed the parsing of nested inline elements.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4621">#4621</a> : Fixed clicking below table cause a empty table been generated.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4450">#4450</a> : Fixed selecting multiple table cells before apply justify commands generates spurious paragraph in Firefox.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4733">#4733</a> : Fixed dialog opening sometimes hang up Firefox and Safari.</li>
 	</ul>
 	<h3>
Index: /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js	(revision 4642)
+++ /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js	(revision 4643)
@@ -252,9 +252,10 @@
 				return;
 
-			var currentIndex = ( me._.currentFocusIndex + offset + focusList.length ) % focusList.length;
+			var startIndex = ( me._.currentFocusIndex + offset + focusList.length ) % focusList.length,
+				currentIndex = startIndex;
 			while ( !focusList[ currentIndex ].isFocusable() )
 			{
 				currentIndex = ( currentIndex + offset + focusList.length ) % focusList.length;
-				if ( currentIndex == me._.currentFocusIndex )
+				if ( currentIndex == startIndex )
 					break;
 			}
Index: /CKEditor/branches/versions/3.1.x/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.1.x/_source/plugins/domiterator/plugin.js	(revision 4642)
+++ /CKEditor/branches/versions/3.1.x/_source/plugins/domiterator/plugin.js	(revision 4643)
@@ -216,9 +216,8 @@
 						endPath = new CKEDITOR.dom.elementPath( range.endContainer );
 
-					// Drop the range if it only contains bookmark nodes.(#4087)
-					if ( boundaryNodes.startNode.equals( boundaryNodes.endNode )
-						&& boundaryNodes.startNode.getParent().equals( startPath.blockLimit )
-						&& boundaryNodes.startNode.type == CKEDITOR.NODE_ELEMENT
-						&& boundaryNodes.startNode.getAttribute( '_fck_bookmark' ) )
+					// Drop the range if it only contains bookmark nodes.(#4087,#4450)
+					if ( boundaryNodes.startNode.getParent().equals( startPath.blockLimit )
+						 && boundaryNodes.startNode.is && boundaryNodes.startNode.getAttribute( '_fck_bookmark' )
+						 && boundaryNodes.endNode.is && boundaryNodes.startNode.getAttribute( '_fck_bookmark' ) )
 					{
 						range = null;
