     atom.workspaceView.prependToBottom(this)
 
   detach: =>
-    return unless @hasParent()
+    return unless @isAttached()
 
     @hideAllTooltips()
     @findResultsView.detach()

    @subscribe @findModel, 'updated', @markersUpdated
    @subscribe @findModel, 'find-error', @findError

    # FIXME: remove when the old editor is out.
    atom.workspaceView.on 'selection:changed', @setCurrentMarkerFromSelection


    else
      @clearMessage()

    if @findModel.pattern isnt @findEditor.getText()
      @findEditor.setText(@findModel.pattern)

