File tree 1 file changed +3
-3
lines changed
src/main/resources/META-INF/frontend/fcEnhancedTabs
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 64
64
// move the selected tab out of the overflow button
65
65
buttons = tabs . _buttons ;
66
66
const selectedIndex = buttons . findIndex ( e => e . item . component && e . item . component . querySelector ( 'vaadin-tab[selected]' ) ) ;
67
- const overflowIndex = buttons . findIndex ( e => e . style . visibility ) ;
68
- if ( selectedIndex >= overflowIndex && overflowIndex > 0 ) {
69
- buttons [ 0 ] . parentElement . insertBefore ( buttons [ selectedIndex ] , buttons [ overflowIndex - 1 ] ) ;
67
+ let overflowIndex = buttons . findIndex ( e => e . style . visibility ) ;
68
+ while ( selectedIndex >= overflowIndex && overflowIndex > 0 && buttons [ selectedIndex ] . style . visibility ) {
69
+ buttons [ 0 ] . parentElement . insertBefore ( buttons [ selectedIndex ] , buttons [ overflowIndex -- ] ) ;
70
70
__detectOverflow ( ) ;
71
71
buttons [ selectedIndex ] . _position = selectedIndex ;
72
72
}
You can’t perform that action at this time.
0 commit comments