Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[Prototype 1.6.0.3] IE throws js error on unload in Events.element

#1155

This is a bug that survived the patch from 1.6.0.2 that should solve this problem for various other events. I'm tracing this using Visual Studio and line 4503 in prototype.js says:

if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;

nodeType here is undefined and event.type is "unload". Reading furhter up the code it seems event.target is undefined as well. Does the event "unload" even have a target?

This needs further patching it seems.

Please let me know if you need further input/trace/etc...

Reported by skaue · October 2nd, 2008 @ 09:33 AM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. splintor
    splintor
    • Tag changed from bug, events, prototype to bug, events, prototype

    See http://extjs.com/forum/showthrea... where I first reported this problem about a year ago with prototype 1.6, and provided a patch.

    It is strange as I don't see anything special about Ext here - it seems every app that will register the unload event will run into this problem. Yet, no one seems to notice it...

    October 15th, 2008 @ 07:55 AM

  2. skaue
    skaue

    Well, Firefox just doesn't care. It unloads and doesn't haul at me like IE does. Before I lost my mind while waiting for a stable patch, we just unplugged the adapter in ExtJs that uses prototype and use Ext base adapter. The error is gone now. It feels easy to blame the adapter, but I'm still under the impression that the failure lays in the Event-object of prototype.

    In our project we're actually planning to move away from prototype and that feels sad. I've been a fanboy of prototype several years now. Seems jQuery is winning the battlefield here at the office... :-/

    October 15th, 2008 @ 08:07 AM

  3. DHH
    DHH
    • State changed from new to invalid

    Prototype now has it's own ticket tracker at http://prototype.lighthouseapp.c...

    October 30th, 2008 @ 11:52 AM

  4. splintor
  5. David Reese