 
   didHide: ->
     @hideAllTooltips()
-    atom.workspaceView.focus()
-    atom.workspaceView.removeClass('find-visible')
+    workspaceElement = atom.views.getView(atom.workspace)
+    workspaceElement.focus()
+    workspaceElement.classList.remove('find-visible')
 
   hideAllTooltips: ->
     @tooltipSubscriptions.dispose()


    @on 'focus', (e) => @findEditor.focus()
    @find('button').on 'click', =>
      atom.workspaceView.focus()

  handleFindEvents: ->
    @findEditor.getModel().onDidStopChanging => @liveSearch()

      if fieldToFocus
        fieldToFocus.focus()
      else if focusEditorAfter
        workspaceElement = atom.views.getView(atom.workspace)
        workspaceElement.focus()
      else
        @findEditor.focus()

