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

TieredMenu: SubMenus are not uncovered on mouse hover anymore #13455

Closed
Maran23 opened this issue Aug 7, 2023 · 6 comments · Fixed by #13457
Closed

TieredMenu: SubMenus are not uncovered on mouse hover anymore #13455

Maran23 opened this issue Aug 7, 2023 · 6 comments · Fixed by #13457
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Maran23
Copy link
Contributor

Maran23 commented Aug 7, 2023

Describe the bug

Since the TieredMenu refactoring done in 28989fd, it works a bit different now (16rc2 -> 16.0.0).
Before, all sub MenuItems of a TieredMenu uncovered themself after hovering over the parent MenuItem when in popup mode.

Environment

Doesn't matter in this case.

Reproducer

See below

Angular version

16.0.0

PrimeNG version

16.1.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.16.0

Browser(s)

All

Steps to reproduce the behavior

This can be easily reproduced by checking out the showcase.
https://www.primefaces.org/primeng-v15-lts/tieredmenu
https://primeng.org/tieredmenu

  1. In the Popup section, click on the Show Button.
  2. If you hover over all the MenuItems like File or Edit, all sub MenuItems will be uncovered in Version 15. This does not happen anymore in Version16, you need to click on the MenuItem to uncover all sub MenuItems.

Expected behavior

Sub MenuItems uncover themself when you hover over the parent MenuItem.

NOTE: autoDisplay is true but it seems to not affect anything at all.
Before the refactoring this behaviour worked when the TieredMenu is a popup or autoDisplay was turned on AFAIK.

@Maran23 Maran23 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 7, 2023
Maran23 added a commit to Maran23/primeng that referenced this issue Aug 7, 2023
…e is hovered over the parent menu item

Regression from 28989fd
To fix the problem the isDirty flag needs to be set to true when the popup is shown or an item is clicked.
This will ensure that onItemChange(..) is called when a MenuItem is hovered by the mouse, which will mark the MenuItem as active and therefore uncover the sub MenuItems (children).
Maran23 added a commit to Maran23/primeng that referenced this issue Aug 7, 2023
…e is hovered over the parent menu item

Regression from 28989fd
To fix the problem the isDirty flag needs to be set to true when the popup is shown or an item is clicked.
This will ensure that onItemChange(..) is called when a MenuItem is hovered by the mouse, which will mark the MenuItem as active and therefore uncover the sub MenuItems (children).
@cetincakiroglu cetincakiroglu added this to the 16.1.1 milestone Aug 8, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 8, 2023
@rosenthalj
Copy link
Contributor

I believe that issue: "TieredMenu: On mobile tieredmenu requires double tap to open submenu #13433" can be fixed by updating Maran23's pull request #13457 with the following one line change:

This proposed change incorporates part of @SoyDiego pull request #13458 to fix issue #13433

@Maran23
Copy link
Contributor Author

Maran23 commented Aug 9, 2023

I believe that issue: "TieredMenu: On mobile tieredmenu requires double tap to open submenu #13433" can be fixed by updating Maran23's pull request #13457 with the following one line change:

This proposed change incorporates part of @SoyDiego pull request #13458 to fix issue #13433

This looks good. I would suggest we first incorporate my PR and create a follow up with your fix? To keep every PR clean and simple. :)

cetincakiroglu added a commit that referenced this issue Aug 9, 2023
Fixed #13455 - TieredMenu does not show sub menus when mouse is hovered over the parent menu item
@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Aug 9, 2023

Some of the component behaviors (focus, hover, mouse events etc.) are changing and will continue to change across the PrimeNG due to accessibility implementation. Since the accessibility implementation is a giant leap forward and includes a lot of refactoring and rework, some of the functionalities may unintentionally be broken. I see that the autoDisplay feature is broken with this update, we'll discuss it with the dev team and find a solution.

Thanks for reporting the issue!

@informatika-medved
Copy link

informatika-medved commented Aug 12, 2023

@cetincakiroglu @Maran23
This issue still occurs on menubar, worked fine before
autoDisplay true does nothing currently

@Maran23
Copy link
Contributor Author

Maran23 commented Aug 14, 2023

This issue still occurs on menubar, worked fine before autoDisplay true does nothing currently

But this is a somewhat separate issue. My fix was only inside the tieredmenu code, not inside the menu component.

@MarcinBorowski95
Copy link

Regression from 16.3.0
This is once more an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
5 participants