From 8cf1467c5c1811af806b527d9f431813bf8325e6 Mon Sep 17 00:00:00 2001
From: Kerwin Bryant <kerwin612@qq.com>
Date: Sat, 12 Apr 2025 09:41:30 +0000
Subject: [PATCH] fix

---
 web_src/js/webcomponents/overflow-menu.ts | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/web_src/js/webcomponents/overflow-menu.ts b/web_src/js/webcomponents/overflow-menu.ts
index bc86c756d1..efb374533b 100644
--- a/web_src/js/webcomponents/overflow-menu.ts
+++ b/web_src/js/webcomponents/overflow-menu.ts
@@ -104,14 +104,20 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
         this.tippyItems.push(item);
 
         // close tippy when clicking item of tippy
-        item.addEventListener('click', () => {
-          this.button?._tippy.hide();
-        });
+        if (!item.hasAttribute('data-tippy-click-added')) {
+          item.addEventListener('click', () => {
+            this.button?._tippy.hide();
+          });
+          item.setAttribute('data-tippy-click-added', 'true');
+        }
       }
       // refresh overflow-button active state
-      item.addEventListener('click', () => {
-        this.updateButtonActivationState();
-      });
+      if (!item.hasAttribute('data-button-update-click-added')) {
+        item.addEventListener('click', () => {
+          this.updateButtonActivationState();
+        });
+        item.setAttribute('data-button-update-click-added', 'true');
+      }
     }
     itemFlexSpace?.style.removeProperty('display');
     itemOverFlowMenuButton?.style.removeProperty('display');