From 6260a769c08cf9cd3e1a1307ebc0fab8dc3c96ea Mon Sep 17 00:00:00 2001 From: Elad Bezalel Date: Mon, 16 Nov 2015 23:43:08 +0200 Subject: [PATCH] fix(util): added toUpperCase to nodeName Custom elements do not always follow the upper case rules http://ejohn.org/blog/nodename-case-sensitivity/ fixes #5609. closes #5771. --- src/core/util/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;