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
This commit is contained in:
parent
8f96817661
commit
c7ce2852c2
|
@ -671,11 +671,17 @@ function wp_attempt_focus(){
|
||||||
setTimeout( function(){ try{
|
setTimeout( function(){ try{
|
||||||
<?php if ( $user_login || $interim_login ) { ?>
|
<?php if ( $user_login || $interim_login ) { ?>
|
||||||
d = document.getElementById('user_pass');
|
d = document.getElementById('user_pass');
|
||||||
|
d.value = '';
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
d = document.getElementById('user_login');
|
d = document.getElementById('user_login');
|
||||||
<?php } ?>
|
<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
|
||||||
|
if( d.value != '' )
|
||||||
d.value = '';
|
d.value = '';
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}?>
|
||||||
d.focus();
|
d.focus();
|
||||||
|
d.select();
|
||||||
} catch(e){}
|
} catch(e){}
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue