HB.ExpandingTextareaComponent = Ember.TextArea.extend({
  registerAutosize: function() {
    this.$().autosize();
  }.on('didInsertElement'),

  clearAutosize: function() {
    this.$().trigger('autosize.destroy');
  }.on('willClearRender'),

  keyDown: function(e) {
    if (e.keyCode === 13 && !e.shiftKey) {
      this.sendAction('enterAction');
      return false;
    }
  }
});
