Sub-menu click closes drawer

Created on 2 October 2024, about 1 month ago

Problem/Motivation

I have a responsive menu in drawer style and sub-menu links on it. When I try to open/close the parent menu item the entire drawer closes an I need to open it again in order to click a sub-menu link.

🐛 Bug report
Status

Active

Version

3.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @janc48
  • 🇬🇪Georgia iamdroid

    Click on the link element in the menu closes the drawer, true, and it is expected behavior. It is made so for handling anchor links on the same page. If your menu item is not intended to lead the user to another location but is intended for only expanding and collapsing the submenu, it shouldn't be a link element. It should be a span element instead and clicking on it won't close the drawer. To render the menu item as the span element you can use <nolink> as the link target.
    Mixed menu elements, which can act as a link and have an additional dropdown button, are currently not supported by the Drawer component.

    If it does not solve your issue still, please provide more details about your setup or how to reproduce the issue.

  • I see the point, however, clicking the parent menu item link doesn't open the page but only expands the submenu and closes the drawer.

  • 🇬🇪Georgia iamdroid

    Please provide steps to reproduce it, otherwise, I can only guess what is wrong.

Production build 0.71.5 2024