Revert Event#findElement changes from 6bb309a

This commit is contained in:
Sam Stephenson 2009-12-03 00:31:35 -06:00
parent 6bb309afb7
commit fa0dce2488

View File

@ -149,8 +149,12 @@
function findElement(event, expression) {
var element = Event.element(event);
if (!expression) return element;
var elements = [element].concat(element.ancestors());
return Prototype.Selector.find(elements, expression, 0);
while (element) {
if (Prototype.Selector.match(element, expression)) {
return Element.extend(element);
}
element = element.parentNode;
}
}
/**