diff --git a/CHANGELOG b/CHANGELOG index 76b8216..505f8f0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make sure Event and Event.extend are defined before wrapping events and calling their handler. Prevents a known Firefox bug from throwing errors on page load/unload (cf.: https://bugzilla.mozilla.org/show_bug.cgi?id=361271). Closes #5393, #9421. [staaky, John Resig, sam, Tobie Langel] + * Minor cosmetic changes to the display of unit tests in terminal. [Tobie Langel] * Make submitting forms work in Opera < 9.1. Closes #9917, #9463, #8260. [kangax] diff --git a/src/event.js b/src/event.js index b516b98..b011bea 100644 --- a/src/event.js +++ b/src/event.js @@ -152,8 +152,9 @@ Object.extend(Event, (function() { if (c.pluck("handler").include(handler)) return false; var wrapper = function(event) { - if (event.eventName && event.eventName != eventName) - return false; + if (!Event || !Event.extend || + (event.eventName && event.eventName != eventName)) + return false; Event.extend(event); handler.call(element, event)