From c7ce2852c2a016de41eb90270383ec3b2734e20a Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 11 Dec 2010 04:59:49 +0000 Subject: [PATCH] Don't clear saved username in wp_attempt_focus. props JohnPBloch, wojtek.szkutnik. fixes #14031. git-svn-id: http://svn.automattic.com/wordpress/trunk@16870 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-login.php b/wp-login.php index 5eae7a3006..d2f7f08916 100644 --- a/wp-login.php +++ b/wp-login.php @@ -671,11 +671,17 @@ function wp_attempt_focus(){ setTimeout( function(){ try{ d = document.getElementById('user_pass'); +d.value = ''; d = document.getElementById('user_login'); - +get_error_code() ) { ?> +if( d.value != '' ) d.value = ''; + d.focus(); +d.select(); } catch(e){} }, 200); }