Fix bug on firefox: pass explicitly the event in javascript functions