From b9a1287a5fb7aa58ec5898a722d6c28ac3ec8d5f Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 25 Aug 2007 07:39:28 +0000 Subject: [PATCH] "Event object conflict: If you include OpenLayers.js AFTER including prototype.js, this effectively replaces most of prototype's Event object with the OpenLayers.Event object, which has undesirable results (i.e. calling Event.observe is actually calling OpenLayers.Event.observe)." Fixed by only creating Event is Event does not already exist. (Closes #880) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4040 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Events.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index fd5f3474bc..11be2c5e0b 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -324,9 +324,9 @@ OpenLayers.Event = { /* prevent memory leaks in IE */ OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false); -if (window.Event) { - OpenLayers.Util.extend(window.Event, OpenLayers.Event); -} else { +// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided +// by OpenLayers. +if (!window.Event) { var Event = OpenLayers.Event; }