@@ -102,7 +102,9 @@ export class ResponsiveNavHelper extends Component<ResponsiveNavHelperProps> {
102102 }
103103 for ( const item of $items ) {
104104 const $item = $ ( item ) ;
105- if ( $item . hasClass ( 'rsh-more' ) || fixedItemSet ?. has ( item ) ) {
105+ const fixed = fixedItemSet ?. has ( item ) ;
106+ $item . toggleClass ( 'rsh-fixed-item' , ! fixed ) ;
107+ if ( fixed || $item . hasClass ( 'rsh-more' ) ) {
106108 continue ;
107109 }
108110
@@ -125,7 +127,7 @@ export class ResponsiveNavHelper extends Component<ResponsiveNavHelperProps> {
125127 }
126128
127129 this . $element . toggleClass ( 'rsh-overflowed' , overflow ) ;
128- $more . css ( 'display' , overflow ? 'flex' : 'none' ) ;
130+ $more . css ( 'display' , overflow ? 'flex' : 'none' ) . appendTo ( this . $element ) ;
129131 }
130132
131133 getContainer ( ) : Cash {
@@ -191,7 +193,7 @@ export class ResponsiveNavHelper extends Component<ResponsiveNavHelperProps> {
191193 if ( ! dropdown ) {
192194 dropdown = new Dropdown ( $dropdown ) ;
193195 }
194- return { items : dropdown . options . items || [ ] , text : $dropdown . find ( '.text' ) . text ( ) , icon : $dropdown . find ( '.icon' ) . attr ( 'class' ) ?. replace ( 'icon ' , '' ) } ;
196+ return { items : dropdown . options . items || dropdown . options . menu ?. items || [ ] , text : $dropdown . find ( '.text' ) . text ( ) , icon : $dropdown . find ( '.icon' ) . attr ( 'class' ) ?. replace ( 'icon ' , '' ) } ;
195197 }
196198 const attrs = Object . fromEntries ( Array . from ( element . attributes ) . map ( attr => [ attr . name , attr . value ] ) ) ;
197199 if ( attrs . style ) {
@@ -209,7 +211,7 @@ export class ResponsiveNavHelper extends Component<ResponsiveNavHelperProps> {
209211 return $more ;
210212 }
211213
212- $more = $ ( '<li class="rsh-more item nav-item"></li>' ) ;
214+ $more = $ ( '<li class="rsh-more item nav-item" style="order:9999" ></li>' ) ;
213215
214216 let moreSetting = this . options . more || { html : '<a><span class="more-vert"></span></a>' , attrs : { title : i18n . getLang ( 'more' ) ! } } ;
215217 if ( typeof moreSetting === 'string' ) {
0 commit comments