diff --git a/src/components/tooltip/tooltip.js b/src/components/tooltip/tooltip.js index 28415ae8d9a..d604c0afe19 100644 --- a/src/components/tooltip/tooltip.js +++ b/src/components/tooltip/tooltip.js @@ -33,7 +33,7 @@ angular * @param {string=} md-direction Which direction would you like the tooltip to go? Supports left, right, top, and bottom. Defaults to bottom. * @param {boolean=} md-autohide If present or provided with a boolean value, the tooltip will hide on mouse leave, regardless of focus */ -function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdTheming, $rootElement, $animate, $q) { +function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdTheming, $animate, $q) { var TOOLTIP_SHOW_DELAY = 300; var TOOLTIP_WINDOW_EDGE_SPACE = 8; @@ -112,8 +112,8 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe function getNearestContentElement () { var current = element.parent()[0]; - // Look for the nearest parent md-content, stopping at the rootElement. - while (current && current !== $rootElement[0] && current !== document.body) { + // Look for the nearest parent md-content + while (current && current !== document.body) { if (current.tagName && current.tagName.toLowerCase() == 'md-content') break; current = current.parentNode; }