Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(util): added toUpperCase to nodeName
Browse files Browse the repository at this point in the history
Custom elements do not always follow the upper case rules

http://ejohn.org/blog/nodename-case-sensitivity/

fixes #5609
  • Loading branch information
EladBezalel committed Nov 23, 2015
1 parent b8d3519 commit 128ca2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/util/util.js
Expand Up @@ -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;
Expand Down

0 comments on commit 128ca2b

Please sign in to comment.