             editor.setCursorBufferPosition([firstChangedLine, range[0][1]])
 
   autoCloseTag: (eventObj, editor) ->
-    return if not @isReactEnabledForEditor editor
+    return if not @isReactEnabledForEditor(editor) or editor != atom.workspace.getActiveTextEditor()
 
     if eventObj?.newText is '>' and !eventObj.oldText
       tokenizedLine = editor.displayBuffer?.tokenizedBuffer?.tokenizedLineForRow(eventObj.newRange.end.row)

contentCheckRegex = null
defaultDetectReactFilePattern = '/((require\\([\'"]react(?:-native)?[\'"]\\)))|(import\\s+\\w+\\s+from\\s+[\'"]react(?:-native)?[\'"])/'
autoCompleteTagStartRegex = /(<)([a-zA-Z0-9\.:$_]+)/g

    disposableHTMLTOJSX = atom.commands.add 'atom-workspace', 'react:HTML-to-JSX', => @onHTMLToJSX()
    disposableProcessEditor = atom.workspace.observeTextEditors @processEditor.bind(this)

    @disposables.add disposableConfigListener
    @disposables.add disposableReformat
    @disposables.add disposableHTMLTOJSX
    @disposables.add disposableProcessEditor


module.exports = AtomReact
