mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 00:02:05 -05:00
14 lines
347 B
Text
14 lines
347 B
Text
|
export default Ember.View.extend({
|
||
|
classNameBindings: [':user-field'],
|
||
|
|
||
|
_focusOnEdit: function() {
|
||
|
if (this.get('controller.editing')) {
|
||
|
Ember.run.scheduleOnce('afterRender', this, '_focusName');
|
||
|
}
|
||
|
}.observes('controller.editing').on('didInsertElement'),
|
||
|
|
||
|
_focusName: function() {
|
||
|
$('.user-field-name').select();
|
||
|
}
|
||
|
});
|