Search code examples
angularjsangularjs-material

Md-menu doesn't position properly


The menu content is partly hidden instead of positioning properly.

<md-menu>
    <md-button ng-click="$mdMenu.open($event)">
    <div layout="row"><div>Edit</div><md-icon md-menu-origin>more_vert</md-icon></div>
    </md-button>
    <md-menu-content>
        <md-menu-item>
            <md-button>Save</md-button>
        </md-menu-item>
        <md-menu-item>
           <md-button>Delete</md-button>
        </md-menu-item>
        <md-menu-item>
           <md-button>Print</md-button>
        </md-menu-item>
     </md-menu-content>
  </md-menu>

enter image description here


Solution

  • Now that I see your view, the problem is not the code, the template is ok, the problem is that you are adding this menu in the bottom of the page, and not using the offset option to correct the position of it, try different values for the y axis.

    <md-menu md-offset="0 -100">