Revert "MDL-23344 fix login form focus"

This reverts commit 70b02b12d3.
This commit is contained in:
Sam Hemelryk
2011-07-13 20:02:58 +08:00
parent e62a947eec
commit 4d4e6d6bfc
2 changed files with 0 additions and 30 deletions
-28
View File
@@ -739,34 +739,6 @@ M.util.get_string = function(identifier, component, a) {
return stringvalue;
};
/**
* Set focus on username or password field of the login form
*/
M.util.focus_login_form = function(Y) {
var username = Y.one('#username');
var password = Y.one('#password');
if (username == null || password == null) {
// something is wrong here
return;
}
var curElement = document.activeElement
if (curElement == 'undefined') {
// legacy browser - skip refocus protection
} else if (curElement.tagName == 'INPUT') {
// user was probably faster to focus something, do not mess with focus
return;
}
if (username.get('value') == '') {
username.focus();
} else {
password.focus();
}
}
//=== old legacy JS code, hopefully to be replaced soon by M.xx.yy and YUI3 code ===
function checkall() {