sidewinderlabs / backplanejs

Other
12 stars 3 forks source link

Event handling broken by changes in f07e8fc3b4 #128

Closed fdintino closed 13 years ago

fdintino commented 13 years ago

UX.Element and UX.Element.Event were introduced in commit f07e8fc3b4 as an attempt to abstract away the differences between IE and W3C DOM event attachment.

UX.Element.Event adds a method stop() that chains together stopPropagation() and preventDefault(). In a few places, code like this:

if (UX.isIE && window.event) {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
} else if (e) {
    e.stopPropagation();
}

was simplified to:

e.stop()

The problem is that there are still many places where event attachments weren't switched over to use UX.Element.addEvent(), and since Event.prototype.stop() isn't a real DOM 2 Event method, an exception is thrown.

Additionally, the mapclick2domactivate function was removed in this commit, apparently by accident.