From 74cf1b3e90432b18f62d878ac49307f7a28dbf85 Mon Sep 17 00:00:00 2001 From: Ruben Vicario Gonzalez Date: Thu, 18 Jun 2015 15:40:09 +0200 Subject: [PATCH 1/2] fix(menu): change container where menu popup is appended --- src/components/menu/menu-interim-element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/menu/menu-interim-element.js b/src/components/menu/menu-interim-element.js index 211e075fb69..edc145a0e45 100644 --- a/src/components/menu/menu-interim-element.js +++ b/src/components/menu/menu-interim-element.js @@ -23,7 +23,7 @@ function MenuProvider($$interimElementProvider) { /* @ngInject */ function menuDefaultOptions($$rAF, $window, $mdUtil, $mdTheming, $timeout, $mdConstant, $document) { return { - parent: 'body', + parent: 'md-content', onShow: onShow, onRemove: onRemove, hasBackdrop: true, @@ -76,7 +76,7 @@ function MenuProvider($$interimElementProvider) { angular.extend(opts, { alreadyOpen: false, isRemoved: false, - target: angular.element(opts.target), //make sure it's not a naked dom node + target: angular.element('md-content'), //make sure it's not a naked dom node parent: angular.element(opts.parent), menuContentEl: angular.element(element[0].querySelector('md-menu-content')), backdrop: opts.hasBackdrop && angular.element('') From 39867e95a281eb9019fbe8e8fdcf5bd3e55d078c Mon Sep 17 00:00:00 2001 From: Ruben Vicario Gonzalez Date: Thu, 18 Jun 2015 16:06:21 +0200 Subject: [PATCH 2/2] Update menu-interim-element.js --- src/components/menu/menu-interim-element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/menu/menu-interim-element.js b/src/components/menu/menu-interim-element.js index edc145a0e45..a5cdf9641ff 100644 --- a/src/components/menu/menu-interim-element.js +++ b/src/components/menu/menu-interim-element.js @@ -76,8 +76,8 @@ function MenuProvider($$interimElementProvider) { angular.extend(opts, { alreadyOpen: false, isRemoved: false, - target: angular.element('md-content'), //make sure it's not a naked dom node - parent: angular.element(opts.parent), + target: angular.element(opts.target), //make sure it's not a naked dom node + parent: angular.element('md-content'), menuContentEl: angular.element(element[0].querySelector('md-menu-content')), backdrop: opts.hasBackdrop && angular.element('') });