Skip to content
This repository has been archived by the owner on Sep 5, 2024. 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. closes #5771.
  • Loading branch information
EladBezalel authored and ThomasBurleson committed Nov 25, 2015
1 parent d423a65 commit 6260a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/util/util.js
Original file line number Diff line number Diff line change
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 6260a76

Please sign in to comment.