Fix Event#element accessing nonexistent tagName property (e.g. when element is a document)

This commit is contained in:
kangax 2008-04-28 18:54:51 -04:00 committed by Tobie Langel
parent 9bcaa91560
commit b75bc189ec
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
* Fix Event#element accessing inexistent tagName property (e.g. when element is a document). (kangax)
* Amended failing Element#identify test.
* Refactor unit tests. Unit tests are now dynamically generated from a JavaScript test file and optional HTML, JS and CSS fixtures. [Tobie Langel]

View File

@ -63,7 +63,7 @@ Event.Methods = (function() {
var node = event.target, type = event.type;
if (event.currentTarget) {
if (event.currentTarget && event.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.