Skip to content

Commit

Permalink
Merge pull request #21 from stephenmcm/focuspatch
Browse files Browse the repository at this point in the history
Set first input of modal form to be focused on dialog open
  • Loading branch information
sheadawson committed Feb 23, 2015
2 parents ea04d75 + 5aa1a72 commit 8d3bb2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions javascript/quickaddnew.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ jQuery.entwine("quickaddnew", function($) {

dlg.load(this.getURL(), function(){
dlg.parent().removeClass("loading");
// set focus to first input element
dlg.find('form :input:visible:enabled:first').focus();
});
}
});
Expand Down

0 comments on commit 8d3bb2e

Please sign in to comment.