Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

IE's attachEvent, FF's addEventListener and Event fire order #2212

ibolmo opened this Issue Jan 19, 2012 · 1 comment


None yet
1 participant

ibolmo commented Jan 19, 2012

(from Lighthouse)

IE 6/7 with attachEvent fires event reversed as they were attached. It's a common issue, not related to mootools. However, the Events class can handle it.

addEvent("domready",function () {
$("x").addEvent("click",function () { alert("1"); });
$("x").addEvent("click",function () { alert("2"); });

FF will alert 1, 2

IE will alert 2, 1

For custom events, it's obviously ok:

addEvent("domready",function () {
$("x").addEvent("custom",function () { alert("1"); });
$("x").addEvent("custom",function () { alert("2"); });
$("x").addEvent("click",function () { this.fireEvent("custom"); });

alert 1,2 for both browsers.

Though I'm not relying on the event order, it might affect stuff without noticing.


ibolmo commented Mar 3, 2014

Closing since low priority (IE6)

@ibolmo ibolmo closed this Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment