Fix event bug for Firefox.