Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(menu): Allow anchor links as menu list items #3680

Merged
merged 4 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mdc-menu/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {cssClasses, strings} from './constants';
import {MDCMenuSurfaceFoundation} from '@material/menu-surface/foundation';
import MDCListFoundation from '@material/list/foundation';

const ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select'];
const ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select', 'a'];

/**
* @extends {MDCFoundation<!MDCMenuAdapter>}
Expand Down
7 changes: 7 additions & 0 deletions packages/mdc-menu/mdc-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
.mdc-list-item--disabled {
cursor: auto;
}

//stylelint-disable selector-max-type, selector-no-qualifying-type
a.mdc-list-item .mdc-list-item__text,
a.mdc-list-item .mdc-list-item__graphic {
pointer-events: none;
}
// stylelint-enable selector-max-type, selector-no-qualifying-type
}

// postcss-bem-linter: define menu
Expand Down