Skip to content

Commit 8cf1467

Browse files
committed
fix
1 parent be93e15 commit 8cf1467

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

web_src/js/webcomponents/overflow-menu.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,20 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
104104
this.tippyItems.push(item);
105105

106106
// close tippy when clicking item of tippy
107+
if (!item.hasAttribute('data-tippy-click-added')) {
108+
item.addEventListener('click', () => {
109+
this.button?._tippy.hide();
110+
});
111+
item.setAttribute('data-tippy-click-added', 'true');
112+
}
113+
}
114+
// refresh overflow-button active state
115+
if (!item.hasAttribute('data-button-update-click-added')) {
107116
item.addEventListener('click', () => {
108-
this.button?._tippy.hide();
117+
this.updateButtonActivationState();
109118
});
119+
item.setAttribute('data-button-update-click-added', 'true');
110120
}
111-
// refresh overflow-button active state
112-
item.addEventListener('click', () => {
113-
this.updateButtonActivationState();
114-
});
115121
}
116122
itemFlexSpace?.style.removeProperty('display');
117123
itemOverFlowMenuButton?.style.removeProperty('display');

0 commit comments

Comments
 (0)