diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index 044e0b3..ffd376f 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -462,8 +462,11 @@ if ( post_type_supports( $post_type, 'comments' ) )
 	wp_comment_reply();
 ?>
 
-<?php if ( (isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message']) ) : ?>
 <script type="text/javascript">
-try{document.post.title.focus();}catch(e){}
+try{
+	var post_title = document.post.title;
+	if ( post_title.value === '' ) {
+		post_title.focus();
+	}
+}catch(e){}
 </script>
-<?php endif; ?>
