diff --git a/src/core/util/util.js b/src/core/util/util.js index 6a7d79860d2..cdec0fda42b 100644 --- a/src/core/util/util.js +++ b/src/core/util/util.js @@ -671,7 +671,7 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in getNearestContentElement: function (element) { var current = element.parent()[0]; // Look for the nearest parent md-content, stopping at the rootElement. - while (current && current !== $rootElement[0] && current !== document.body && current.nodeName !== 'MD-CONTENT') { + while (current && current !== $rootElement[0] && current !== document.body && current.nodeName.toUpperCase() !== 'MD-CONTENT') { current = current.parentNode; } return current;