Permalink
Browse files

Ensure Event#findElement only calls Selector.match with element nodes

  • Loading branch information...
sstephenson committed Apr 9, 2010
1 parent 9f5da9b commit b1f4f28f62e521954906f50089b5c7aa3bc5e077
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/dom/event.js
View
@@ -228,7 +228,7 @@
var element = Event.element(event);
if (!expression) return element;
while (element) {
- if (Prototype.Selector.match(element, expression)) {
+ if (Object.isElement(element) && Prototype.Selector.match(element, expression)) {
return Element.extend(element);
}
element = element.parentNode;

0 comments on commit b1f4f28

Please sign in to comment.