Only emit editor-open event once (on first attachment)

This commit is contained in:
Corey Johnson
2012-04-19 18:12:55 -07:00
parent 800f16bb29
commit eaf7ee8ec1
2 changed files with 8 additions and 3 deletions

View File

@@ -201,7 +201,9 @@ class Editor extends View
else
@gutter.addClass('drop-shadow')
@on 'attach', =>
@on 'attach', (e) =>
return if @attached
@attached = true
@calculateDimensions()
@hiddenInput.width(@charWidth)
@setMaxLineLength() if @softWrap