summaryrefslogtreecommitdiff
path: root/modules/gallery/views/login_ajax.html.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-20 17:18:11 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-20 17:18:11 -0700
commit261da7b1c362fe329fe97ca8478a0c6b3721dedf (patch)
treee67d3fd26953a07732a5af476b0443474e2bb5f2 /modules/gallery/views/login_ajax.html.php
parent7bdb9a49e5b038b21445d77c21f63b18619f8fb8 (diff)
Set the focus on the username field (and the name field when we reset
the password) properly on IE7 using a setTimeout() hack. Fixes ticket #807.
Diffstat (limited to 'modules/gallery/views/login_ajax.html.php')
-rw-r--r--modules/gallery/views/login_ajax.html.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/views/login_ajax.html.php b/modules/gallery/views/login_ajax.html.php
index 36647f9d..88fe2389 100644
--- a/modules/gallery/views/login_ajax.html.php
+++ b/modules/gallery/views/login_ajax.html.php
@@ -10,9 +10,16 @@
$(".submit").addClass("g-button ui-state-default ui-corner-all");
$(".submit").gallery_hover_init();
ajaxify_login_reset_form();
+
+ // See comment about IE7 below
+ setTimeout('$("#g-name").focus()', 100);
}
});
});
+
+ // Setting the focus here doesn't work on IE7, perhaps because the field is
+ // not ready yet? So set a timeout and do it the next time we're idle
+ setTimeout('$("#g-username").focus()', 100);
});
function ajaxify_login_reset_form() {