mirror of https://github.com/rancher/ui.git
Focus username by default
https://github.com/rancher/rancher/issues/10845
This commit is contained in:
parent
4c17335b54
commit
94d5ef9cae
|
|
@ -1,4 +1,5 @@
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
|
import { next } from '@ember/runloop';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
import { get } from '@ember/object';
|
import { get } from '@ember/object';
|
||||||
|
|
@ -26,5 +27,14 @@ export default Component.extend({
|
||||||
this.set('password','');
|
this.set('password','');
|
||||||
this.sendAction('action', code);
|
this.sendAction('action', code);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
didInsertElement() {
|
||||||
|
next(() => {
|
||||||
|
if ( this.isDestroyed || this.isDestroying ) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
this.$('INPUT')[0].focus();
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue