Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Menu without submenu doesn’t work in mobile mode when menu link point to modal popup. #9685

Open
pdhar2000 opened this issue Oct 19, 2023 · 2 comments

Comments

@pdhar2000
Copy link

pdhar2000 commented Oct 19, 2023

Required information

Hi we are using the Web Experience Toolkit (WET) menu https://wet-boew.github.io/wet-boew/demos/menu/menu-en.html, which should open modal popup https://wet-boew.github.io/v4.0-ci/demos/overlay/overlay-en.html. Menu consists of both main menu items and submenus.

data-trgt option is used to generate mobile version of the menu. However, modal popup doesn't work with menu that doesn't have submenu for mobile version.

Please note, desktop version works fine for menus without submenu.

To Reproduce
Steps to reproduce the behavior:

  1. Add a menu without submenu
  2. Add data-trgt panel so that mobile menu can be generated.
  3. Make menu link point to a modal popup.
  4. In mobile mode click on the menu (that doesn't have submenu).

Nothing happen

Expected behavior
It should open Modal popup

Additional information (optional)

Version of WET-BOEW/GCWeb you are using
v4.0.53

Desktop/Smartphone (please complete the following information)

  • Windows
  • Browser [chrome, Firefox, Edge]
@pdhar2000
Copy link
Author

demo.zip

I upload a zip file (demo.zip) to demonstrate the issue.

  • Unzip
  • Open the menu.html in browser
  • Switch to mobile view
  • Click on “No Submenu” Item

@pdhar2000 pdhar2000 changed the title [OTHER] Menu without submenu doesn’t work in mobile mode when menu link point to modal popup. [Bug] Menu without submenu doesn’t work in mobile mode when menu link point to modal popup. Oct 22, 2023
@pdhar2000
Copy link
Author

I think issue is here

"$1 class='mb-item' " + "role='menuitem' aria-setsize='" +

As you can see, the code is not checking if the link item is using lightbox class or not, it is always replacing with mb-item class. So solution that we are using is to check if the link item using lightbox class and not blindly replacing everything with mb-item class. This solution works with both popups and regular links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant