       event.preventDefault()
       t.selectionStart = t.selectionEnd = ss + tabLength
 
-
-
+  viewAppended: ->
+    @initialHeight = @$().height()

  resize: ->
    return  unless @_clone
    @_clone.appendTo 'body' unless document.body.contains @_clone[0]
    @_clone.html @getValue().replace /\n/gm, "<br />"
    height = @_clone.height()
    if @$().css('box-sizing') is "border-box"
      padding    = parseInt(@_clone.css("padding-top"), 10) + parseInt(@_clone.css("padding-bottom"), 10)
      border     = parseInt(@_clone.css("border-top-width"), 10) + parseInt(@_clone.css("border-bottom-width"), 10)
      height     = height + border + padding

    @setHeight height

  enableTabKey:-> @inputTabKeyEnabled = yes


  setAutoGrow:->

    $input = @$()
    $input.css "overflow", "hidden"

    @setClass "autogrow"

