diff --git a/src/event.js b/src/event.js index cfee8af..20657a9 100644 --- a/src/event.js +++ b/src/event.js @@ -63,15 +63,14 @@ Event.Methods = (function() { var node = event.target, type = event.type, - currentTarget = event.currentTarget, - tagName = currentTarget.tagName; + currentTarget = event.currentTarget; - if (currentTarget && tagName) { + if (currentTarget && currentTarget.tagName) { // Firefox screws up the "click" event when moving between radio buttons // via arrow keys. It also screws up the "load" and "error" events on images, // reporting the document as the target instead of the original image. if (type === 'load' || type === 'error' || - (type === 'click' && tagName.toLowerCase() === 'input' + (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' && currentTarget.type === 'radio')) node = currentTarget; }