diff --git a/framework/core/js/forum/src/components/forgot-password-modal.js b/framework/core/js/forum/src/components/forgot-password-modal.js index befa231e5..891167117 100644 --- a/framework/core/js/forum/src/components/forgot-password-modal.js +++ b/framework/core/js/forum/src/components/forgot-password-modal.js @@ -49,7 +49,7 @@ export default class ForgotPasswordModal extends FormModal { background: true, extract: xhr => { if (xhr.status === 404) { - this.alert = new Alert({ type: 'warning', message: 'That email wasn\'t found in our database.' }); + this.alert(new Alert({ type: 'warning', message: 'That email wasn\'t found in our database.' })); throw new Error; } return null; diff --git a/framework/core/js/forum/src/components/form-modal.js b/framework/core/js/forum/src/components/form-modal.js index e2b11892b..f4bdfbae2 100644 --- a/framework/core/js/forum/src/components/form-modal.js +++ b/framework/core/js/forum/src/components/form-modal.js @@ -51,6 +51,8 @@ export default class FormModal extends Component { if (errors) { this.$('[name='+errors[0].path+']').select(); + } else { + this.$(':input:first').select(); } } }