code: function handleDocumentClick(e) {
    if (!findSVGAtPoint(e.clientX, e.clientY)) { return; }
  
    // Remove current overlay
    let overlay = document.getElementById('pdf-annotate-edit-overlay');
    if (overlay) {
      if (isDragging || e.target === overlay) {
        return;
      }
  
      destroyEditOverlay();
    }
  }
docs: Handle document.click event
  
  @param {Event} e The DOM event that needs to be handled