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

Menu with matMenuContent breaks hover behaviour #16954

Closed
Harpush opened this issue Sep 3, 2019 · 1 comment · Fixed by #16960
Closed

Menu with matMenuContent breaks hover behaviour #16954

Harpush opened this issue Sep 3, 2019 · 1 comment · Fixed by #16960
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Harpush
Copy link

Harpush commented Sep 3, 2019

Reproduction

https://stackblitz.com/edit/angular-nzsa6j?file=app/nested-menu-example.html

Steps to reproduce:

  1. Open the menu and quickly hover on items... more than one item will be styled as hovered while doing so and even after at some scenarios.
    It only happens for menu items with trigger it seems

Expected Behavior

What behavior were you expecting to see?
The hover functionality should work the same as without the matMenuContent

Actual Behavior

What behavior did you actually see?
The hover functionality isn't working as expected and highlighting more than one element (even with slight delay it seems)

Environment

  • Angular: 8.2.4
  • CDK/Material: 8.1.4
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@crisbeto crisbeto self-assigned this Sep 3, 2019
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Sep 3, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 3, 2019
Currently in some cases we restore focus immediately and in others we wait for the exit animation to finish (when using `matMenuContent`) because the focus restoration logic is coupled to the menu cleanup. This means that if multiple animations overlap, we could end up restoring focus to the wrong element. These changes switch to restoring focus immediately in all cases.

Fixes angular#16954.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 3, 2019
Currently in some cases we restore focus immediately and in others we wait for the exit animation to finish (when using `matMenuContent`) because the focus restoration logic is coupled to the menu cleanup. This means that if multiple animations overlap, we could end up restoring focus to the wrong element. These changes switch to restoring focus immediately in all cases.

Fixes angular#16954.
jelbourn pushed a commit that referenced this issue Sep 6, 2019
Currently in some cases we restore focus immediately and in others we wait for the exit animation to finish (when using `matMenuContent`) because the focus restoration logic is coupled to the menu cleanup. This means that if multiple animations overlap, we could end up restoring focus to the wrong element. These changes switch to restoring focus immediately in all cases.

Fixes #16954.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 7, 2019
Currently in some cases we restore focus immediately and in others we wait for the exit animation to finish (when using `matMenuContent`) because the focus restoration logic is coupled to the menu cleanup. This means that if multiple animations overlap, we could end up restoring focus to the wrong element. These changes switch to restoring focus immediately in all cases.

Fixes angular#16954.
jelbourn pushed a commit that referenced this issue Sep 9, 2019
Currently in some cases we restore focus immediately and in others we wait for the exit animation to finish (when using `matMenuContent`) because the focus restoration logic is coupled to the menu cleanup. This means that if multiple animations overlap, we could end up restoring focus to the wrong element. These changes switch to restoring focus immediately in all cases.

Fixes #16954.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants