diff --git a/CHANGELOG b/CHANGELOG index 819f926..5fd9a12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +*SVN* + +* Handle case-sensitivity in Selector tag names better. Closes #5052. [mexx, Andrew Dupont] + *1.6.0.1* (December 4, 2007) * Change document.viewport.getDimensions to exclude scrollbars in all cases. Closes #10148, #9288. [Nick Stackenburg] diff --git a/src/selector.js b/src/selector.js index f49d539..b5814d6 100644 --- a/src/selector.js +++ b/src/selector.js @@ -396,7 +396,7 @@ Object.extend(Selector, { // TOKEN FUNCTIONS tagName: function(nodes, root, tagName, combinator) { - tagName = tagName.toUpperCase(); + var uTagName = tagName.toUpperCase(); var results = [], h = Selector.handlers; if (nodes) { if (combinator) { @@ -409,7 +409,7 @@ Object.extend(Selector, { if (tagName == "*") return nodes; } for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() == tagName) results.push(node); + if (node.tagName.toUpperCase() === uTagName) results.push(node); return results; } else return root.getElementsByTagName(tagName); },