material icon indicating copy to clipboard operation
material copied to clipboard

md-menu fails and blocks the page with dynamic menu items

Open ddimitrop opened this issue 11 years ago • 2 comments

If the menu-items of a md-menu are dynamic (i.e. with ng-repeat) and are completely missing at the time that the menu opens, this does not open at all but instead leaves the scroll overlay and completely blocks the document.

Reason is this line: https://github.com/angular/material/blob/master/src/components/menu/js/menuServiceProvider.js#L420

To reproduce: http://codepen.io/anon/pen/yYOwqa

Add a value (i.e.1) in ng-init and everything works fine. Otherwise its not possible to click the button after attempting to click on the menu, and the menu does not open.

ddimitrop avatar Sep 18 '15 21:09 ddimitrop

Same issue here #4687

jb29 avatar Sep 19 '15 08:09 jb29

Fixed with SHA 4f841379bdf2. Here is a updated CodePen Demo using bower-material/master and ng v1.4.6.

ThomasBurleson avatar Sep 22 '15 16:09 ThomasBurleson