Skip to content

Instantly share code, notes, and snippets.

@nexneo
Created July 15, 2009 18:12
Show Gist options
  • Save nexneo/147867 to your computer and use it in GitHub Desktop.
Save nexneo/147867 to your computer and use it in GitHub Desktop.
SC.InlineTextAreaView = SC.InlineTextFieldView.extend({
isTextArea: YES,
// needed to override this because original view has,
// $('input') doesn't take care of both the case
willRemoveFromParent: function() {
this.$input()[0].blur();
},
// needed to override this because original view has,
// $('input') doesn't take care of both the case
willLoseFirstResponder: function(responder) {
if (responder !== this) return;
// should have been covered by willRemoveFromParent, but this was needed
// too.
this.$input()[0].blur();
return this.blurEditor() ;
},
insertNewline: function(evt) {
return NO ;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment