event fix for firefox