 export class Info extends React.Component
   constructor: (props) ->
     super props
+
+    @overlay = React.createRef()
 
     @state =
       isBusy: false

            onClick: @dismissEditor
            onMouseDown: @handleClickStart
            onMouseUp: @handleClickEnd
            ref: (element) => @overlay = element

            div className: 'beatmapset-description-editor__container osu-page',
              el BBCodeEditor,

  # likewise, starting on an inner element end ending on the outer element will still use the outer element as the event target.
  dismissEditor: (e) =>
    @setState isEditing: false if e.button == 0 &&
                                  e.target == @overlay.current &&
                                  @clickEndTarget == @clickStartTarget


