The problem seems to be related to how Ember gets this.$()for the view, which doesn’t play very well with the autoload plugin, which causes autogrow to listen to events incorrectly on TextArea. Explicitly creating a selector using a elementIdview allows your example to work.
I am using Ember 1.0.0-PRE.4
Example: http://jsbin.com/adedag/8/edit
App.TextField = Ember.TextArea.extend({
didInsertElement: function() {
opts = {
animate: false,
cloneClass: 'faketextarea'
}
$('#'+this.get('elementId')).autogrow(opts);
}
});
source
share