 
 
   componentDidMount: =>
-    document.addEventListener 'click', @hideSelector
+    element.addEventListener 'click', @hideSelector for element in Blackout.el
 
 
   componentDidUpdate: (_prevProps, prevState) =>



  hideSelector: (e) =>
    return if e.button != 0
    return unless @state.showingSelector
    return if $(e.target).closest(@ref.current).length

    @setState showingSelector: false


  itemSelected: (event, item) ->



  componentWillUnmount: ->
    element.removeEventListener 'click', @hideSelector for element in Blackout.el


  render: =>
