fix chrome/firefox conflict when handling events.