diff --git a/app/assets/javascripts/wizard/components/wizard-field.js.es6 b/app/assets/javascripts/wizard/components/wizard-field.js.es6 index 4b09212fbeb..27d291d4c06 100644 --- a/app/assets/javascripts/wizard/components/wizard-field.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field.js.es6 @@ -7,7 +7,7 @@ export default Ember.Component.extend({ typeClass: type => `${Ember.String.dasherize(type)}-field`, @computed('field.id') - fieldClass: id => `field-${Ember.String.dasherize(id)}`, + fieldClass: id => `field-${Ember.String.dasherize(id)} wizard-focusable`, @computed('field.type', 'field.id') inputComponentName(type, id) { diff --git a/app/assets/javascripts/wizard/components/wizard-step.js.es6 b/app/assets/javascripts/wizard/components/wizard-step.js.es6 index b0a0618ab2e..c8b628f24cd 100644 --- a/app/assets/javascripts/wizard/components/wizard-step.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step.js.es6 @@ -48,7 +48,11 @@ export default Ember.Component.extend({ keyPress(key) { if (key.keyCode === 13) { - this.send('nextStep'); + if (this.get('showDoneButton')) { + this.send('quit'); + } else { + this.send('nextStep'); + } } }, @@ -63,13 +67,13 @@ export default Ember.Component.extend({ autoFocus() { Ember.run.scheduleOnce('afterRender', () => { - const $invalid = $('.wizard-field.invalid:eq(0) input'); + const $invalid = $('.wizard-field.invalid:eq(0) .wizard-focusable'); if ($invalid.length) { return $invalid.focus(); } - $('input:eq(0)').focus(); + $('.wizard-focusable:eq(0)').focus(); }); }, diff --git a/app/assets/javascripts/wizard/templates/components/invite-list.hbs b/app/assets/javascripts/wizard/templates/components/invite-list.hbs index fb0299b704d..6b383776682 100644 --- a/app/assets/javascripts/wizard/templates/components/invite-list.hbs +++ b/app/assets/javascripts/wizard/templates/components/invite-list.hbs @@ -9,7 +9,7 @@