File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 244
244
245
245
// Fix a Safari bug where a text node gets passed as the target of an
246
246
// anchor click rather than the anchor itself.
247
- if ( node . nodeType == Node . TEXT_NODE )
248
- node = node . parentNode ;
249
-
250
- return Element . extend ( node ) ;
247
+ return node . nodeType == Node . TEXT_NODE ? node . parentNode : node ;
251
248
}
252
249
253
250
/**
274
271
* });
275
272
**/
276
273
function findElement ( event , expression ) {
277
- var element = _element ( event ) , match = Prototype . Selector . match ;
274
+ var element = _element ( event ) , selector = Prototype . Selector ;
278
275
if ( ! expression ) return Element . extend ( element ) ;
279
276
while ( element ) {
280
- if ( Object . isElement ( element ) && match ( element , expression ) )
277
+ if ( Object . isElement ( element ) && selector . match ( element , expression ) )
281
278
return Element . extend ( element ) ;
282
279
element = element . parentNode ;
283
280
}
You can’t perform that action at this time.
0 commit comments