Focus on textfield

by wmarbut

HTML

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://raw.github.com/wycats/handlebars.js/1.0.0-rc.3/dist/handlebars.runtime.js"></script>
<script src="https://raw.github.com/wycats/handlebars.js/1.0.0-rc.3/dist/handlebars.js"></script>
<script src="https://raw.github.com/emberjs/ember.js/release-builds/ember-1.0.0-rc.3.js"></script>
<div id="app">
    
</div>
<script type="text/x-handlebars" data-template-name="index-view">
    I am index
    
    {{view App.CustomTextArea}}
</script>

JavaScript

window.App = Ember.Application.create({rootElement: '#app'});


App.IndexController = Ember.Controller.extend({

});
App.IndexView = Ember.View.extend({ templateName: 'index-view' });

App.CustomTextArea = Ember.TextArea.extend({
    didInsertElement: function() {  
        this._super();
        this.$().focus()
    }
})



App.Router.map(function() {
});