Skip to content
Browse files

Revert "MDL-23344 fix login form focus"

This reverts commit 2d28584.
  • Loading branch information...
1 parent fe97a3d commit accc55da276f9b38cd919ac765d7626bdedf42c4 Sam Hemelryk committed Jul 13, 2011
Showing with 0 additions and 30 deletions.
  1. +0 −28 lib/javascript-static.js
  2. +0 −2 login/index.php
View
28 lib/javascript-static.js
@@ -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() {
View
2 login/index.php
@@ -327,8 +327,6 @@
echo $OUTPUT->box_end();
} else {
include("index_form.html");
- //focus username or password
- $PAGE->requires->js_init_call('M.util.focus_login_form', null, true);
}
echo $OUTPUT->footer();

0 comments on commit accc55d

Please sign in to comment.
Something went wrong with that request. Please try again.