diff --git a/app/assets/javascripts/discourse/views/modal/login_view.js b/app/assets/javascripts/discourse/views/modal/login_view.js index eddba035d..058fda0ab 100644 --- a/app/assets/javascripts/discourse/views/modal/login_view.js +++ b/app/assets/javascripts/discourse/views/modal/login_view.js @@ -56,7 +56,9 @@ Discourse.LoginView = Discourse.ModalBodyView.extend({ Em.run.schedule('afterRender', function() { $('#login-account-password, #login-account-name').keydown(function(e) { if (e.keyCode === 13) { - loginController.login(); + if (!loginController.get('loginDisabled')) { + loginController.send('login'); + } } }); });