Demo here: http://codepen.io/anon/pen/jWXJbb
You can see the issue by opening the first menu (Phone) and clicking on "Option 2", which will hide the second menu button (Envelope). When Envelope is hidden, the menu for Phone is hidden as well, even though md-prevent-menu-close is on the menu button. If you click Option 2 again on Phone it will show Envelope again and not close Phone's menu (correct behavior).
I think this is due to the commit for #6545, which adds this:
menuContainer.on('$destroy', function() {
$mdMenu.destroy();
});
It doesn't check if the $mdMenu that's being destroyed is actually associated with the destroyed menu container.
Locally I have done this, which seems to work but not sure if it's a good fix:
menuContainer.on('$destroy', function () {
if(self.isOpen) $mdMenu.destroy();
});
Thank you!
@rschmukler do you mind taking a look at this suggested fix? Thanks
I don't know, but I think self.isOpen
is not an elegant solution, because it's not binded in way to the actual interimElement
stack.
This issue is closed as part of our 鈥楽urge Focus on Material 2' efforts.
For details, see our forum posting @ http://bit.ly/1UhZyWs.