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:
Kristiyan Kostadinov
2017-07-27 19:43:57 +03:00
committed by Andrew Seguin
parent 59319d03ab
commit eaa6099262
+7
View File
@@ -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;
}