I believe we've fixed this since 1.6.0. Update to 1.6.0.2 and see if
it still happens.

Cheers,
Andrew

On Sep 2, 8:47 am, therutz <[EMAIL PROTECTED]> wrote:
> Using prototype.js 1.6.0 and Firefox 2.0.0.x and Event.element()
> returns the wrong element. Instead of an HTMLImageElement it's
> returning the document. Looks like a general bug with these versions
> of Firefox, both PC and Mac.
>
> I found that same problem and a fix in a site about Rails.
>
> From line: 3775
>
> element: function(event) {
>   //var node = Event.extend(event).target;
>   //return Element.extend(node.nodeType == Node.TEXT_NODE ?
> node.parentNode : node);
>   event = Event.extend(event);
>   var ct, node = event.target, t = event.type;
>
>   /* get correct target for Firefox */
>   if(ct = event.currentTarget){
>     var tagName = ct.tagName.toUpperCase();
>     if((tagName == 'IMG' && /^(load|error)$/.test(t)) ||
>       (tagName == 'INPUT' && ct.type == 'radio' && t == 'click'))
>         node = ct;
>   }
>   return Element.extend(node && node.nodeType == Node.TEXT_NODE ?
> node.parentNode : node);
>
> },
>
> Don't know if this has been covered elsewhere, but I think it should.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to