#1426 new
loduis (at hotmail)

Opera and IE bug (stopObserving)

Reported by loduis (at hotmail) | October 23rd, 2012 @ 04:23 PM


var element = new Element('div');

element.update('Test fire event.');

document.body.insert(element);

element.observe('click:first', function (event) {
  console.log('First click ...')
  var element = event.findElement();
  // stop observing next all event
  // this destroy the element of Event.cache
  // but Opera and IE run next handlers berfore
  // stopObserving remove all handler
  element.stopObserving();
});

element.observe('click:second', function (event) {
  console.log('Second click ...');
});

element.fire('click:first');

See Lines:

6719: var cacheEntry = Event.cache[uid];
6729:  var cacheEntry = Event.cache[uid], element = cacheEntry.element;
6744: var cacheEntry = Event.cache[uid], element = cacheEntry.element;

cacheEntry is null because stopObserving remove from cache.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages