       lines.addClass(klass)
       lines.length > 0
 
+    @focus() if @focusOnAttach
+
     @trigger 'editor:attached', [this]
 
   pixelPositionForBufferPosition: (bufferPosition) ->

    @closest('.pane').view()

  focus: ->
    @component?.onFocus()

module.exports =
class ReactEditorView extends View
  @content: -> @div class: 'editor react-wrapper'

  focusOnAttach: false

  constructor: (@editor) ->
    super
