Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Focus the first input element on screen show.

Very useful for usability.

issue #92
  • Loading branch information...
commit 0239e4ba0b675244f533a9d314457a05154461ea 1 parent 7f1a822
@shane-tomlinson shane-tomlinson authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 browserid/static/dialog/controllers/dialog_controller.js
View
4 browserid/static/dialog/controllers/dialog_controller.js
@@ -43,7 +43,9 @@ $.Controller("Dialog", {}, {
renderTemplates: function(body, body_vars, footer, footer_vars) {
if (body) {
var bodyHtml = $.View("//dialog/views/" + body, body_vars);
- $('#dialog').html(bodyHtml).hide().fadeIn(300);
+ $('#dialog').html(bodyHtml).hide().fadeIn(300, function() {
+ $('#dialog input').eq(0).focus();
+ });
}
if (footer) {
Please sign in to comment.
Something went wrong with that request. Please try again.