Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 4634)
+++ /CKEditor/trunk/CHANGES.html	(revision 4635)
@@ -91,4 +91,5 @@
 		<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/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/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4634)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4635)
@@ -260,9 +260,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;
 			}
