I want ember input autofocus component. Do you have any idea ?
Hi Vinoth, how about an auto-focusing custom component:
export default Ember.TextField.extend({
doFocus: Ember.on('didInsertElement', function() {
this.$().focus();
})
});
@emberigniter Previously I was using this autofocus component . In latest Ember 2.3.0 this “Ember.TextField” is deprecated ?
Use the <input>
( or {{input}}
) element with the html5 autofocus
attribute
try this
{{input type="text" autofocus="true"}}
Really cool, I completely forgot about that autofocus
attribute!
@vinothwindows47 It doesn’t look like deprecated: http://emberjs.com/api/classes/Ember.TextField.html