-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(COMPONENT): Inconsistency in behavior of a[mat-button] and a[mat-menu-item] when disabled #30203
Comments
Can you add your reproduction to a Stackblitz? |
Setting the .mat-mdc-menu-item[disabled] {
pointer-events: none;
} |
@reuse-ay Thanks for the StackBlitz, thats really helpful. Hmm it does seem like I do see the context menu on Chrome and Safari that has the options to navigate to link despite it being disabled, and its only happening in the @shhdharmen I tried adding that code but still see option to navigate to the link. |
@amysorto I think it's CSS specificity. If you add Demo: https://stackblitz.com/edit/github-w9fhqnyb?file=src%2Fstyles.scss I think it can be added around this line: components/src/material/menu/menu.scss Line 180 in af29a92
!important there I think.
|
Is this a regression?
The previous version in which this bug was not present was
No response
Description
This may be a feature request.
When a[mat-button] is disabled, if you right-click it, the menu will be the normal one, but if you right-click a[mat-menu-item], the options for clicking a link will be displayed, and you can actually navigate to the page.
Reproduction
https://github.com/reuse-ay/angular-mat-a.git
Expected Behavior
When a[mat-menu-item] is disabled, I don’t want the option for the link to be displayed.
Actual Behavior
option for the link to be displayed.
Environment
The text was updated successfully, but these errors were encountered: