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(MatMenu): Tooltip on menu options not dismissable #29996

Closed
1 task
divyaprakash-dp opened this issue Nov 12, 2024 · 1 comment · Fixed by #29997
Closed
1 task

bug(MatMenu): Tooltip on menu options not dismissable #29996

divyaprakash-dp opened this issue Nov 12, 2024 · 1 comment · Fixed by #29997
Assignees
Labels
area: material/menu P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@divyaprakash-dp
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Accessibility requirement
When additional content is triggered on pointer hover or on keyboard focus, that additional content MUST be visually perceived and MUST be dismissible.

Issue
When we add tooltip to menu option, it gets displayed on focussing the menu option using keyboard. Pressing Esc closes the mat menu completely. Tooltip alone should be dismissible.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-5lpuen?file=src%2Fmain.ts
Steps to reproduce:

  1. Open the menu
  2. Focus on an option and tooltip will be shown
  3. Press Esc

Expected Behavior

Tooltip alone should be dismissible.

Actual Behavior

Mat menu is closed

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):
@divyaprakash-dp divyaprakash-dp added the needs triage This issue needs to be triaged by the team label Nov 12, 2024
@crisbeto crisbeto self-assigned this Nov 12, 2024
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/menu and removed needs triage This issue needs to be triaged by the team labels Nov 12, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 12, 2024
Currently `mat-menu` handles it keyboard events in the template, however this ignores the overlay's stacking context which can capture some events that it shouldn't.

These changes switch the menu to handling the events through the common dispatcher instead.

Fixes angular#29996.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 14, 2024
Currently `mat-menu` handles it keyboard events in the template, however this ignores the overlay's stacking context which can capture some events that it shouldn't.

These changes switch the menu to handling the events through the common dispatcher instead.

Fixes angular#29996.
crisbeto added a commit that referenced this issue Nov 14, 2024
Currently `mat-menu` handles it keyboard events in the template, however this ignores the overlay's stacking context which can capture some events that it shouldn't.

These changes switch the menu to handling the events through the common dispatcher instead.

Fixes #29996.
crisbeto added a commit that referenced this issue Nov 14, 2024
Currently `mat-menu` handles it keyboard events in the template, however this ignores the overlay's stacking context which can capture some events that it shouldn't.

These changes switch the menu to handling the events through the common dispatcher instead.

Fixes #29996.

(cherry picked from commit 42f6a4a)
@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 Dec 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/menu 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