Fixed login form being focused too early (caused page to scroll up)
authorDan
Fri, 16 Jan 2009 13:14:08 -0500
changeset 816 44b8446533e1
parent 815 c2b3b1464224
child 817 880c4b7eb658
child 818 12346be3ec3d
Fixed login form being focused too early (caused page to scroll up)
includes/clientside/static/login.js
--- a/includes/clientside/static/login.js	Fri Jan 16 13:13:37 2009 -0500
+++ b/includes/clientside/static/login.js	Fri Jan 16 13:14:08 2009 -0500
@@ -709,24 +709,14 @@
   logindata.mb_inner.appendChild(div);
   
   // Post operations: field focus
-  if ( IE )
-  {
-    setTimeout(
-      function()
-      {
-        if ( logindata.loggedin_username )
-          document.getElementById('ajax_login_field_password').focus();
-        else
-          document.getElementById('ajax_login_field_username').focus();
-      }, 200);        
-  }
-  else
-  {
-    if ( data.username )
-      f_password.focus();
-    else
-      f_username.focus();
-  }
+  setTimeout(
+    function()
+    {
+      if ( logindata.loggedin_username )
+        document.getElementById('ajax_login_field_password').focus();
+      else
+        document.getElementById('ajax_login_field_username').focus();
+    }, 750);        
   
   // Post operations: show captcha window
   if ( show_captcha )