mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(menu): prevent user from accidentally opening a sub-menu while animating (#5996)
Makes the menu panel non-interactive while it is animating, preventing the user from accidentally triggering a sub-menu.
This commit is contained in:
committed by
Andrew Seguin
parent
59319d03ab
commit
eaa6099262
@@ -15,6 +15,13 @@ $mat-menu-border-radius: 2px !default;
|
||||
max-height: calc(100vh - #{$mat-menu-item-height});
|
||||
border-radius: $mat-menu-border-radius;
|
||||
|
||||
// Prevent the user from interacting while the panel is still animating.
|
||||
// This avoids issues where the user could accidentally open a sub-menu,
|
||||
// because of the `overlapTrigger` option.
|
||||
&.ng-animating {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@include cdk-high-contrast {
|
||||
outline: solid 1px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user