We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9e8de0 commit c4cbd36Copy full SHA for c4cbd36
menu/internal/menu.ts
@@ -518,10 +518,13 @@ export abstract class Menu extends LitElement {
518
519
if (event.relatedTarget) {
520
// Don't close the menu if we are switching focus between menu,
521
- // md-menu-item, and md-list or if the anchor was click focused.
+ // md-menu-item, and md-list or if the anchor was click focused, but check
522
+ // if length of pointerPath is 0 because that means something was at least
523
+ // clicked (shift+tab case).
524
if (
525
isElementInSubtree(event.relatedTarget, this) ||
- isElementInSubtree(event.relatedTarget, anchorEl)
526
+ (this.pointerPath.length !== 0 &&
527
+ isElementInSubtree(event.relatedTarget, anchorEl))
528
) {
529
return;
530
}
0 commit comments