FIX: Tab ordering and outlines for wizard

This commit is contained in:
Robin Ward
2016-09-22 13:38:40 -04:00
parent adfa2cb09e
commit 92529cd409
9 changed files with 18 additions and 15 deletions

View File

@ -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();
});
},