Permalink
Browse files

fix for a small problem w.r.t. ModalBox i.c.m. Prototype

  • Loading branch information...
1 parent b5f478d commit 2e78d602ad9d72cf6c4b15ae740aba4273573a38 @dslmeinte dslmeinte committed Oct 18, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 redist/prototype.js
View
@@ -4019,19 +4019,20 @@ Object.extend(Event, (function() {
return element;
},
+ // FIXED: https://prototype.lighthouseapp.com/projects/8886/tickets/622-eventstopobserving-on-window-object-crashes-when-removing-multiple-handlers-in-one-call
stopObserving: function(element, eventName, handler) {
element = $(element);
var id = getEventID(element), name = getDOMEventName(eventName);
if (!handler && eventName) {
getWrappersForEventName(id, eventName).each(function(wrapper) {
- element.stopObserving(eventName, wrapper.handler);
+ Event.stopObserving(element, eventName, wrapper.handler); // FIXED
});
return element;
} else if (!eventName) {
Object.keys(getCacheForID(id)).each(function(eventName) {
- element.stopObserving(eventName);
+ Event.stopObserving(element, eventName); // FIXED
});
return element;
}

0 comments on commit 2e78d60

Please sign in to comment.