Skip to content

Commit

Permalink
Set the focus on the username field (and the name field when we reset
Browse files Browse the repository at this point in the history
the password) properly on IE7 using a setTimeout() hack.  Fixes ticket
#807.
  • Loading branch information
bharat committed Jun 21, 2010
1 parent 7bdb9a4 commit 261da7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gallery/views/login_ajax.html.php
Expand Up @@ -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() {
Expand Down

0 comments on commit 261da7b

Please sign in to comment.