File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff 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' ) ;
You can’t perform that action at this time.
0 commit comments