How do you set the md-menu active Item
When you first click the menu the first item has a grey background https://material.angularjs.org/latest/#/demo/material.components.menu
How do I set which item is preselected like this or get rid of this altogether.

(function () {
"use strict";
angular
.module('starter.directives', [])
.directive('mdLink',function($location){
return {
restrict:'A',
link:function(scope, element, attrs){
var url=attrs.href;
var addedCss=attrs.mdLink;
scope.location=$location;
scope.$watch('location.absUrl()',function(newUrl){
if (url === newUrl) {
element.addClass(addedCss);
} else {
element.removeClass(addedCss);
}
});
}
}
});
})();
@vanntian How does this relate to the md-menu directive https://material.angularjs.org/latest/#/demo/material.components.menu
@deliriousrhino that is added for accessibility. It is a focus state. Will talk to the team to see if this is something that we want to support removing
+1
+1
:+1:
Edit: My current use case requires to remove auto-focusing the first element. Users get confused because they think that this element is already active.
Please give us the option to remove it. It's good for accessibility, but doesn't really make sense for users to have the first item auto focused.
+1
It's a problem that the first element is still active while I hover over other items. That way, it looks like multiple items are active at the same time. It also looks like the first item is "something special"/highlighted, because it stays highlighted until I click a menu item or press an arrow button. It draws extra attention where extra attention is not wanted/needed.

+1, problem persisting here, same above.
This is especially problematic when you have an ng-repeat of md-menu-items followed by manually added md-menu-items. See this codepen: http://codepen.io/anon/pen/xwjzMy?editors=101. If you scroll all the way down and back up, you'll see that the "Save search as filter" stays highlighted.
The hover issues described by @erinjanae have been resolved. The focus and hover states now behave correctly. The initial focus state is per the spec and important for accessibility. If you really want to restyle it, the best way would probably be by overriding styles.
@rschmukler OK, so this initial focus state is according to the spec? I will argue that this behaviour needs looking at again and that there should be an override option. I'm experiencing the exact problem that @iver56 has above.
For anyone still having issue with this, this is how I got around it:
.system-menu {
.md-button.md-default-theme:not([disabled]):focus, .md-button:not([disabled]):focus {
background-color: transparent;
}
}
I was able to fix this with the following. This is the only thing that worked for me and we also had a disabled class so I applied the enabled selector to prevent the disabled items from showing the gray hover background:
.md-button:first-child:enabled {
background-color: #fff;
}
.md-button:first-child:hover:enabled {
background-color: rgba(158,158,158,0.2);
}