mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 17:15:25 +08:00
14 lines
347 B
Plaintext
14 lines
347 B
Plaintext
|
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();
|
||
|
}
|
||
|
});
|