hide () {
    // remove temporary absolutely positioned anchor
    if (this.dom.absoluteAnchor) {
      this.dom.absoluteAnchor.destroy()
      delete this.dom.absoluteAnchor
    }

    // remove the menu from the DOM
    if (this.dom.root.parentNode) {
      this.dom.root.parentNode.removeChild(this.dom.root)
      if (this.onClose) {
        this.onClose()
      }
    }

    if (ContextMenu.visibleMenu === this) {
      ContextMenu.visibleMenu = undefined
    }
  }
Hide the context menu if visible