File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
61
61
}
62
62
63
63
const itemFlexSpace = this . menuItemsEl . querySelector ( '.item-flex-space' ) ;
64
+ const itemOverFlowMenuButton = this . querySelector ( '.overflow-menu-button' ) ;
64
65
65
66
// move items in tippy back into the menu items for subsequent measurement
66
67
for ( const item of this . tippyItems || [ ] ) {
@@ -72,7 +73,9 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
72
73
}
73
74
74
75
// measure which items are partially outside the element and move them into the button menu
76
+ // flex space and overflow menu are excluded from measurement
75
77
itemFlexSpace ?. style . setProperty ( 'display' , 'none' , 'important' ) ;
78
+ itemOverFlowMenuButton ?. style . setProperty ( 'display' , 'none' , 'important' ) ;
76
79
this . tippyItems = [ ] ;
77
80
const menuRight = this . offsetLeft + this . offsetWidth ;
78
81
const menuItems = this . menuItemsEl . querySelectorAll ( '.item, .item-flex-space' ) ;
@@ -89,6 +92,7 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
89
92
}
90
93
}
91
94
itemFlexSpace ?. style . removeProperty ( 'display' ) ;
95
+ itemOverFlowMenuButton ?. style . removeProperty ( 'display' ) ;
92
96
93
97
// if there are no overflown items, remove any previously created button
94
98
if ( ! this . tippyItems ?. length ) {
You can’t perform that action at this time.
0 commit comments