make js event work on firefox