Make enter key work to submit the signup form

This commit is contained in:
Neil Lalonde 2013-05-03 12:33:08 -04:00
parent 3c322e6d3d
commit 16bc215c68
2 changed files with 2 additions and 1 deletions

View file

@ -57,6 +57,7 @@
{{#if loadingAbove}}
<div class='spinner'>{{i18n loading}}</div>
{{/if}}
{{collection itemViewClass="Discourse.PostView" contentBinding="content.posts" topicViewBinding="view"}}
{{#if loadingBelow}}

View file

@ -280,7 +280,7 @@ Discourse.CreateAccountView = Discourse.ModalBodyView.extend({
// but only when the submit button is enabled
var _this = this;
return Em.run.next(function() {
return $("input[type='text']").keydown(function(e) {
return $("input[type='text'], input[type='password']").keydown(function(e) {
if (_this.get('submitDisabled') === false && e.keyCode === 13) {
return _this.createAccount();
}