       @props.onHide?()
 
 
-  onClick: =>
+  toggle: =>
     @setState active: !@state.active
-    @props.onShow?()
+    if @state.active then @props.onHide?() else @props.onShow?()
 
 
   render: =>

      button
        className: 'play-detail-menu__button'
        type: 'button'
        onClick: @onClick
        i className: 'fas fa-ellipsis-v'

      @renderMenu()

                  mode: @props.score.beatmap.mode
                  user: @props.score.user_id
          'data-turbolinks': false
          onClick: @toggle
          osu.trans 'users.show.extra.top_ranks.download_replay'
