When i click on 2nd level menu in mobile it collapse all active menu. I tested this on default theme also. it also happening there. I think its default issue.

How can i prevent it to stop collapse all menu and only collapse current menu?


I had managed this issue by custom jquery and css to solve. This might help someone.

Javascript Code Below:

require(['jquery', 'jquery/ui'], function($){
// ... Irrelevant code omitted ...
$(document).ready(function() {
// ... Irrelevant code omitted ...
$('li.level0 li.parent > a').prepend('<span class="rm-expand close"></span>');

jQuery('.navigation .columns-group li.level1.parent > a').click(function(e) {
    return false;

$('.rm-expand').click(function() {


   if ($(this).hasClass('open')) {
   } else {
   return false;
// ... Irrelevant code omitted ...

CSS Code Below

li.level0 ul {
li.level0 ul a {
.rm-expand {
     float:right;display:block;font-family: 'icons-blank-theme';font-size:42px;position:absolute;right: 7px;top: -6px;

Reference: Magento 2 - 3rd level menu items collapsed on mobile devices

Note: It may require some css changes as per your theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.