Skip to content

Commit

Permalink
fix(menu): prevent user from accidentally opening a sub-menu while an…
Browse files Browse the repository at this point in the history
…imating (#5996)

Makes the menu panel non-interactive while it is animating, preventing the user from accidentally triggering a sub-menu.
crisbeto authored and andrewseguin committed Jul 27, 2017

Verified

This commit was signed with the committer’s verified signature.
thaJeztah Sebastiaan van Stijn
1 parent 59319d0 commit eaa6099
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/menu/menu.scss
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit eaa6099

Please sign in to comment.